diff options
Diffstat (limited to 'block/ioctl.c')
-rw-r--r-- | block/ioctl.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index c722de0ef2ee..eb046aeede8a 100644 --- a/block/ioctl.c +++ b/block/ioctl.c | |||
@@ -43,12 +43,9 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user | |||
43 | || pstart < 0 || plength < 0) | 43 | || pstart < 0 || plength < 0) |
44 | return -EINVAL; | 44 | return -EINVAL; |
45 | } | 45 | } |
46 | /* partition number in use? */ | 46 | |
47 | mutex_lock(&bdev->bd_mutex); | 47 | mutex_lock(&bdev->bd_mutex); |
48 | if (disk->part[part - 1]) { | 48 | |
49 | mutex_unlock(&bdev->bd_mutex); | ||
50 | return -EBUSY; | ||
51 | } | ||
52 | /* overlap? */ | 49 | /* overlap? */ |
53 | for (i = 0; i < disk->minors - 1; i++) { | 50 | for (i = 0; i < disk->minors - 1; i++) { |
54 | struct hd_struct *s = disk->part[i]; | 51 | struct hd_struct *s = disk->part[i]; |