summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-09-05 14:18:22 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-06 10:40:38 +0200
commit1f08be80bef6f7a3faaa728db836b47ff742f41f (patch)
treecfe898a80e37e3c612f6b4d88845d6b44ee6c3f3 /drivers/s390/block/dasd.c
parent9016083b7bc4829c4f97f37a1a3102e0f5a37692 (diff)
downloadlinux-1f08be80bef6f7a3faaa728db836b47ff742f41f.tar.gz
linux-1f08be80bef6f7a3faaa728db836b47ff742f41f.tar.bz2
linux-1f08be80bef6f7a3faaa728db836b47ff742f41f.zip
s390/dasd: move wake_up call
Ensure that all work is done when the process waiting for a dasd state change is woken up. With this change it is save to assume that after a userspace triggered state change and a udev settle invocation there are no unexpected users of a dasd device. Acked-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r--drivers/s390/block/dasd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 15370a2c5ff0..6498d15f874f 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -534,11 +534,11 @@ static void dasd_change_state(struct dasd_device *device)
if (rc)
device->target = device->state;
- if (device->state == device->target)
- wake_up(&dasd_init_waitq);
-
/* let user-space know that the device status changed */
kobject_uevent(&device->cdev->dev.kobj, KOBJ_CHANGE);
+
+ if (device->state == device->target)
+ wake_up(&dasd_init_waitq);
}
/*