diff options
Diffstat (limited to 'drivers/block/drbd/drbd_int.h')
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index d7ca76ce00cb..e84c7b6a6bac 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -735,8 +735,8 @@ enum bm_flag { | |||
735 | 735 | ||
736 | struct drbd_work_queue { | 736 | struct drbd_work_queue { |
737 | struct list_head q; | 737 | struct list_head q; |
738 | struct semaphore s; /* producers up it, worker down()s it */ | ||
739 | spinlock_t q_lock; /* to protect the list. */ | 738 | spinlock_t q_lock; /* to protect the list. */ |
739 | wait_queue_head_t q_wait; | ||
740 | }; | 740 | }; |
741 | 741 | ||
742 | struct drbd_socket { | 742 | struct drbd_socket { |
@@ -1832,9 +1832,8 @@ drbd_queue_work_front(struct drbd_work_queue *q, struct drbd_work *w) | |||
1832 | unsigned long flags; | 1832 | unsigned long flags; |
1833 | spin_lock_irqsave(&q->q_lock, flags); | 1833 | spin_lock_irqsave(&q->q_lock, flags); |
1834 | list_add(&w->list, &q->q); | 1834 | list_add(&w->list, &q->q); |
1835 | up(&q->s); /* within the spinlock, | ||
1836 | see comment near end of drbd_worker() */ | ||
1837 | spin_unlock_irqrestore(&q->q_lock, flags); | 1835 | spin_unlock_irqrestore(&q->q_lock, flags); |
1836 | wake_up(&q->q_wait); | ||
1838 | } | 1837 | } |
1839 | 1838 | ||
1840 | static inline void | 1839 | static inline void |
@@ -1843,9 +1842,8 @@ drbd_queue_work(struct drbd_work_queue *q, struct drbd_work *w) | |||
1843 | unsigned long flags; | 1842 | unsigned long flags; |
1844 | spin_lock_irqsave(&q->q_lock, flags); | 1843 | spin_lock_irqsave(&q->q_lock, flags); |
1845 | list_add_tail(&w->list, &q->q); | 1844 | list_add_tail(&w->list, &q->q); |
1846 | up(&q->s); /* within the spinlock, | ||
1847 | see comment near end of drbd_worker() */ | ||
1848 | spin_unlock_irqrestore(&q->q_lock, flags); | 1845 | spin_unlock_irqrestore(&q->q_lock, flags); |
1846 | wake_up(&q->q_wait); | ||
1849 | } | 1847 | } |
1850 | 1848 | ||
1851 | static inline void wake_asender(struct drbd_tconn *tconn) | 1849 | static inline void wake_asender(struct drbd_tconn *tconn) |