]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
loop-cleanup-partitions-when-detaching-loop-device-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Mar 2013 04:07:00 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:28:21 +0000 (16:28 +1100)
add comment, per Phillip

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/loop.c

index e9aaddba763f96f45b1b288fa638c15105643f1e..1e0cc5a9ff8d7b6e9a9e19195ca781e7ec6f28e6 100644 (file)
@@ -1049,6 +1049,10 @@ static int loop_clr_fd(struct loop_device *lo)
                lo->lo_disk->flags |= GENHD_FL_NO_PART_SCAN;
        mutex_unlock(&lo->lo_ctl_mutex);
        if (bdev) {
+               /*
+                * Remove all partitions, since BLKRRPART won't remove user
+                * added partitions when max_part=0.
+                */
                struct disk_part_iter piter;
                struct hd_struct *part;