summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-12-08 02:36:14 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:28:38 -0800
commitfd27c7a1bfa9801544ca961cdb4ca0b4998580b8 (patch)
tree44749ea9d81931cbe5a753b972f6b9fde92a6496 /fs/block_dev.c
parent35a6027f1ab6594068cb8bca7705e4567753946b (diff)
[PATCH] lockdep: remove lock_key approach to managing nested bd_mutex locks
The extra call to get_gendisk is not good. It causes a ->probe and possible module load before it is really appropriate to do this. Cc: Ingo Molnar <mingo@elte.hu> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Neil Brown <neilb@suse.de> 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.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 528cf053ce9..36c38f48a4e 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -355,14 +355,10 @@ static int bdev_set(struct inode *inode, void *data)
static LIST_HEAD(all_bdevs);
-static struct lock_class_key bdev_part_lock_key;
-
struct block_device *bdget(dev_t dev)
{
struct block_device *bdev;
struct inode *inode;
- struct gendisk *disk;
- int part = 0;
inode = iget5_locked(bd_mnt->mnt_sb, hash(dev),
bdev_test, bdev_set, &dev);
@@ -388,11 +384,6 @@ struct block_device *bdget(dev_t dev)
list_add(&bdev->bd_list, &all_bdevs);
spin_unlock(&bdev_lock);
unlock_new_inode(inode);
- mutex_init(&bdev->bd_mutex);
- disk = get_gendisk(dev, &part);
- if (part)
- lockdep_set_class(&bdev->bd_mutex, &bdev_part_lock_key);
- put_disk(disk);
}
return bdev;
}