]> git.baikalelectronics.ru Git - kernel.git/commit
loop: cleanup partitions when detaching loop device
authorPhillip Susi <psusi@ubuntu.com>
Fri, 22 Mar 2013 18:21:53 +0000 (12:21 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 22 Mar 2013 18:21:53 +0000 (12:21 -0600)
commit0f425cc843419f0e9e83b3cee690fd6400e6a925
treeebe3db5af9e706a3d3c5aaf4ba2b74459b02572b
parent795a6f7f4bf24593a60be1defca7ac42036e02db
loop: cleanup partitions when detaching loop device

Any partitions added by user space to the loop device were being
left in place after detaching the loop device.  This was because
the detach path issued a BLKRRPART to clean up partitions if
LO_FLAGS_PARTSCAN was set, meaning that the partitions were auto
scanned on attach.  Replace this BLKRRPART with code that
unconditionally cleans up partitions on detach instead.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Modified by Jens to export delete_partition().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partition-generic.c
drivers/block/loop.c