From: Guo Chao Date: Wed, 20 Feb 2013 02:13:53 +0000 (+1100) Subject: block: remove redundant check to bd_openers() X-Git-Tag: next-20130220~1^2~609 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7725de9b71121105c2caa51becf91a36920c193c;p=karo-tx-linux.git 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 --- 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)