mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Modified by Jens to export delete_partition(). Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
183cfb5720
commit
8761a3dc1f
2 changed files with 20 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue