]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
drivers/block/loop.c: emit uevent on auto release
authorPhillip Susi <psusi@cfl.rr.com>
Wed, 21 Sep 2011 08:02:13 +0000 (10:02 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Sep 2011 08:02:13 +0000 (10:02 +0200)
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>
drivers/block/loop.c

index b336433f815723a62caab39da3a5eaa1e98c119e..c2ce03cf3a58c92d878636470d5983d1b1fbdce5 100644 (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 {