diff options
author | Guo Chao <yan@linux.vnet.ibm.com> | 2013-02-21 18:16:43 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-02-22 04:42:46 -0500 |
commit | de33127d8d3f1d570aad8c2223cd81b206636bc1 (patch) | |
tree | e3c42e69a78a0fb98100e1e3d43352481a05d62d /fs/block_dev.c | |
parent | d646a02a9d44d1421f273ae3923d97b47b918176 (diff) |
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 <yan@linux.vnet.ibm.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Guo Chao <yan@linux.vnet.ibm.com>
Cc: M. Hindess <hindessm@uk.ibm.com>
Cc: Nikanth Karthikesan <knikanth@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 82b7c9ad29ac..2f7058421ffb 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1119,7 +1119,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) | |||
1119 | } | 1119 | } |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | if (!ret && !bdev->bd_openers) { | 1122 | if (!ret) { |
1123 | bd_set_size(bdev,(loff_t)get_capacity(disk)<<9); | 1123 | bd_set_size(bdev,(loff_t)get_capacity(disk)<<9); |
1124 | bdi = blk_get_backing_dev_info(bdev); | 1124 | bdi = blk_get_backing_dev_info(bdev); |
1125 | if (bdi == NULL) | 1125 | if (bdi == NULL) |