summaryrefslogtreecommitdiffstats
path: root/block/ioctl.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2006-07-14 00:24:12 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-14 21:53:53 -0700
commitddca60c59032b2c2babc0003cf01015aff340b79 (patch)
treec836af2259cb55ebae060268c52b1d3f4773d819 /block/ioctl.c
parent7e56a7dcbb974d9725d80e50d70c6eed7f71110b (diff)
downloadlinux-ddca60c59032b2c2babc0003cf01015aff340b79.tar.bz2
[PATCH] lockdep: annotate the BLKPG_DEL_PARTITION ioctl
The delete partition IOCTL takes the bd_mutex for both the disk and the partition; these have an obvious hierarchical relationship and this patch annotates this relationship for lockdep. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'block/ioctl.c')
-rw-r--r--block/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 9cfa2e1ecb24..309760b7e37f 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -72,7 +72,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
bdevp = bdget_disk(disk, part);
if (!bdevp)
return -ENOMEM;
- mutex_lock(&bdevp->bd_mutex);
+ mutex_lock_nested(&bdevp->bd_mutex, BD_MUTEX_PARTITION);
if (bdevp->bd_openers) {
mutex_unlock(&bdevp->bd_mutex);
bdput(bdevp);
@@ -82,7 +82,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
fsync_bdev(bdevp);
invalidate_bdev(bdevp, 0);
- mutex_lock(&bdev->bd_mutex);
+ mutex_lock_nested(&bdev->bd_mutex, BD_MUTEX_WHOLE);
delete_partition(disk, part);
mutex_unlock(&bdev->bd_mutex);
mutex_unlock(&bdevp->bd_mutex);