From 23e2632cc815fb6cc38560805a12be586e23a8f1 Mon Sep 17 00:00:00 2001 From: Phillip Susi Date: Sat, 16 Jul 2011 23:31:06 +1000 Subject: [PATCH] Fix the loopback device to emit a uevent on auto release. The loopback driver failed to emit the change uevent when auto releasing the device. Fix lo_release() to pass the bdev to loop_clr_fd() so it can emit the event. Cc: Jens Axboe Signed-off-by: Phillip Susi Signed-off-by: Andrew Morton --- drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 76c8da78212b..35d9f986d863 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1509,7 +1509,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 { -- 2.39.5