• Phillip Susi's avatar
    loop: cleanup partitions when detaching loop device · 8761a3dc
    Phillip Susi authored
    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: default avatarPhillip Susi <psusi@ubuntu.com>
    
    Modified by Jens to export delete_partition().
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    8761a3dc
partition-generic.c 14 KB