aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2009-11-16 09:48:54 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2009-11-24 12:11:05 -0500
commit6c6c7951be7652f86109f2193651b78d90907c0d (patch)
treecdac6aeaaf0f96288ffcc0f8338eb41f596af68a /drivers/block
parent32a87c0114f37871aefb12a30de3e0c3300e3646 (diff)
fix in-kernel configuration serialization
this is uncritical, as we still also serialize in userland, but to correctly serialize on the CONFIG_PENDING bit, it must be wait_event(state_wait, \!test_and_set_bit) Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_nl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index e2a5875a07b1..436a090b532b 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -733,7 +733,7 @@ void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int max_seg_s) __mu
733 */ 733 */
734static void drbd_reconfig_start(struct drbd_conf *mdev) 734static void drbd_reconfig_start(struct drbd_conf *mdev)
735{ 735{
736 wait_event(mdev->state_wait, test_and_set_bit(CONFIG_PENDING, &mdev->flags)); 736 wait_event(mdev->state_wait, !test_and_set_bit(CONFIG_PENDING, &mdev->flags));
737 wait_event(mdev->state_wait, !test_bit(DEVICE_DYING, &mdev->flags)); 737 wait_event(mdev->state_wait, !test_bit(DEVICE_DYING, &mdev->flags));
738 drbd_thread_start(&mdev->worker); 738 drbd_thread_start(&mdev->worker);
739} 739}