]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
block: remove redundant check to bd_openers()
authorGuo Chao <yan@linux.vnet.ibm.com>
Thu, 7 Feb 2013 01:26:05 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:12 +0000 (16:46 +1100)
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>
fs/block_dev.c

index 78edf767b5cc08bc36cdf1fefeed1578b3fd38b7..12030948448780aacab5fa7a4545c42016045f75 100644 (file)
@@ -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)