OSDN Git Service

Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / block / partition-generic.c
index 3b03015..746935a 100644 (file)
@@ -397,7 +397,7 @@ static int drop_partitions(struct gendisk *disk, struct block_device *bdev)
        struct hd_struct *part;
        int res;
 
-       if (bdev->bd_part_count)
+       if (bdev->bd_part_count || bdev->bd_super)
                return -EBUSY;
        res = invalidate_partition(disk, 0);
        if (res)