aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 528cf053ce96..36c38f48a4ed 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -355,14 +355,10 @@ static int bdev_set(struct inode *inode, void *data)
355 355
356static LIST_HEAD(all_bdevs); 356static LIST_HEAD(all_bdevs);
357 357
358static struct lock_class_key bdev_part_lock_key;
359
360struct block_device *bdget(dev_t dev) 358struct block_device *bdget(dev_t dev)
361{ 359{
362 struct block_device *bdev; 360 struct block_device *bdev;
363 struct inode *inode; 361 struct inode *inode;
364 struct gendisk *disk;
365 int part = 0;
366 362
367 inode = iget5_locked(bd_mnt->mnt_sb, hash(dev), 363 inode = iget5_locked(bd_mnt->mnt_sb, hash(dev),
368 bdev_test, bdev_set, &dev); 364 bdev_test, bdev_set, &dev);
@@ -388,11 +384,6 @@ struct block_device *bdget(dev_t dev)
388 list_add(&bdev->bd_list, &all_bdevs); 384 list_add(&bdev->bd_list, &all_bdevs);
389 spin_unlock(&bdev_lock); 385 spin_unlock(&bdev_lock);
390 unlock_new_inode(inode); 386 unlock_new_inode(inode);
391 mutex_init(&bdev->bd_mutex);
392 disk = get_gendisk(dev, &part);
393 if (part)
394 lockdep_set_class(&bdev->bd_mutex, &bdev_part_lock_key);
395 put_disk(disk);
396 } 387 }
397 return bdev; 388 return bdev;
398} 389}