summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2006-09-29 02:01:01 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 09:18:19 -0700
commit87d7c8aca8670a772f74766c19e0345a606b67a9 (patch)
tree5373f4a6095d8772f33f1c9faa12f1a583f8f14e /fs/block_dev.c
parent303912e2a32aa73785b4c4dee15466d944a38a46 (diff)
downloadlinux-87d7c8aca8670a772f74766c19e0345a606b67a9.tar.gz
linux-87d7c8aca8670a772f74766c19e0345a606b67a9.tar.bz2
linux-87d7c8aca8670a772f74766c19e0345a606b67a9.zip
[PATCH] block_dev.c mutex_lock_nested() fix
In the case below we are locking the whole disk not a partition. This change simply brings the code in line with the piece above where when we are the 'first' opener, and we are a partition. Signed-off-by: Jason Baron <jbaron@redhat.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 8cc144ffc382..4346468139e8 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1031,7 +1031,7 @@ do_open(struct block_device *bdev, struct file *file, unsigned int subclass)
rescan_partitions(bdev->bd_disk, bdev);
} else {
mutex_lock_nested(&bdev->bd_contains->bd_mutex,
- BD_MUTEX_PARTITION);
+ BD_MUTEX_WHOLE);
bdev->bd_contains->bd_part_count++;
mutex_unlock(&bdev->bd_contains->bd_mutex);
}