drivers/block/loop.c: emit uevent on auto release

The loopback driver failed to emit the change uevent when auto releasing
the device.  Fixed lo_release() to pass the bdev to loop_clr_fd() so it
can emit the event.

Signed-off-by: Phillip Susi <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Ayan George <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Phillip Susi 2011-09-21 10:02:13 +02:00 • committed by Jens Axboe
commit 8a9c594422

View file

@ -1583,7 +1583,7 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
* In autoclear mode, stop the loop thread
* and remove configuration after last close.
*/
err = loop_clr_fd(lo, NULL);
err = loop_clr_fd(lo, lo->lo_device);
if (!err)
goto out_unlocked;
} else {