From 7725de9b71121105c2caa51becf91a36920c193c Mon Sep 17 00:00:00 2001 From: Guo Chao Date: Wed, 20 Feb 2013 13:13:53 +1100 Subject: [PATCH] block: remove redundant check to bd_openers() bd_openers is stable under bd_mutex, no need to check it twice. Signed-off-by: Guo Chao Cc: Alexander Viro Cc: Guo Chao Cc: M. Hindess Cc: Nikanth Karthikesan Cc: Jens Axboe Signed-off-by: Andrew Morton --- fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 78edf767b5cc..120309484487 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1120,7 +1120,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) } } - if (!ret && !bdev->bd_openers) { + if (!ret) { bd_set_size(bdev,(loff_t)get_capacity(disk)<<9); bdi = blk_get_backing_dev_info(bdev); if (bdi == NULL) -- 2.39.5