diff options
author | Phillip Susi <psusi@ubuntu.com> | 2013-03-22 12:21:53 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-22 12:21:53 -0600 |
commit | 8761a3dc1f07b163414e2215a2cadbb4cfe2a107 (patch) | |
tree | ebe3db5af9e706a3d3c5aaf4ba2b74459b02572b /block | |
parent | 183cfb5720dfc393641b87710ce78561af3db6cd (diff) | |
download | lwn-8761a3dc1f07b163414e2215a2cadbb4cfe2a107.tar.gz lwn-8761a3dc1f07b163414e2215a2cadbb4cfe2a107.zip |
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/partition-generic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/partition-generic.c b/block/partition-generic.c index 789cdea05893..ae95ee6a58aa 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -257,6 +257,7 @@ void delete_partition(struct gendisk *disk, int partno) hd_struct_put(part); } +EXPORT_SYMBOL(delete_partition); static ssize_t whole_disk_show(struct device *dev, struct device_attribute *attr, char *buf) |