diff options
-rw-r--r-- | block/ioctl.c | 2 | ||||
-rw-r--r-- | fs/block_dev.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index e3f5eb9882cf..e06dbe9bc858 100644 --- a/block/ioctl.c +++ b/block/ioctl.c | |||
@@ -82,7 +82,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user | |||
82 | fsync_bdev(bdevp); | 82 | fsync_bdev(bdevp); |
83 | invalidate_bdev(bdevp, 0); | 83 | invalidate_bdev(bdevp, 0); |
84 | 84 | ||
85 | mutex_lock(&bdev->bd_mutex); | 85 | mutex_lock_nested(&bdev->bd_mutex, 1); |
86 | delete_partition(disk, part); | 86 | delete_partition(disk, part); |
87 | mutex_unlock(&bdev->bd_mutex); | 87 | mutex_unlock(&bdev->bd_mutex); |
88 | mutex_unlock(&bdevp->bd_mutex); | 88 | mutex_unlock(&bdevp->bd_mutex); |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 0c59b703e9d5..575076c018f4 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1101,6 +1101,13 @@ static int __blkdev_get(struct block_device *bdev, mode_t mode, unsigned flags, | |||
1101 | int for_part); | 1101 | int for_part); |
1102 | static int __blkdev_put(struct block_device *bdev, int for_part); | 1102 | static int __blkdev_put(struct block_device *bdev, int for_part); |
1103 | 1103 | ||
1104 | /* | ||
1105 | * bd_mutex locking: | ||
1106 | * | ||
1107 | * mutex_lock(part->bd_mutex) | ||
1108 | * mutex_lock_nested(whole->bd_mutex, 1) | ||
1109 | */ | ||
1110 | |||
1104 | static int do_open(struct block_device *bdev, struct file *file, int for_part) | 1111 | static int do_open(struct block_device *bdev, struct file *file, int for_part) |
1105 | { | 1112 | { |
1106 | struct module *owner = NULL; | 1113 | struct module *owner = NULL; |