[PATCH 1/2] Fixed loopback device to emit uevent on auto release

From: Phillip Susi
Date: Tue Sep 06 2011 - 15:07:30 EST


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@xxxxxxxxxx>
---
drivers/block/loop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 4720c7a..6d0f28d 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1513,7 +1513,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 {
--
1.7.4.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/