Skip to content

Commit

Permalink
drivers/block/loop.c: emit uevent on auto release
Browse files Browse the repository at this point in the history
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 <psusi@cfl.rr.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ayan George <ayan@ayan.net>
Signed-off-by: Andrew Morton <akpm@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Phillip Susi authored and Jens Axboe committed Sep 21, 2011
1 parent 5a3a76e commit 8a9c594
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8a9c594

Please sign in to comment.