From: Guo Chao Date: Thu, 7 Feb 2013 01:26:05 +0000 (+1100) Subject: block: remove redundant check to bd_openers() X-Git-Tag: next-20130218~1^2~518 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a64eaf59b15a57cb4ba8a05bdaa77e99ce376915;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)