2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00

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>
This commit is contained in:
Sebastian Ott 2012-09-05 14:18:22 +02:00 committed by Martin Schwidefsky
parent 9016083b7b
commit 1f08be80be

View File

@ -534,11 +534,11 @@ static void dasd_change_state(struct dasd_device *device)
if (rc) if (rc)
device->target = device->state; device->target = device->state;
if (device->state == device->target)
wake_up(&dasd_init_waitq);
/* let user-space know that the device status changed */ /* let user-space know that the device status changed */
kobject_uevent(&device->cdev->dev.kobj, KOBJ_CHANGE); kobject_uevent(&device->cdev->dev.kobj, KOBJ_CHANGE);
if (device->state == device->target)
wake_up(&dasd_init_waitq);
} }
/* /*