Skip to content

Commit

Permalink
s390/dasd: move wake_up call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Sep 6, 2012
1 parent 9016083 commit 1f08be8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 1f08be8

Please sign in to comment.