]> Git Repo - linux.git/commitdiff
block: remove redundant check to bd_openers()
authorGuo Chao <[email protected]>
Thu, 21 Feb 2013 23:16:43 +0000 (15:16 -0800)
committerJens Axboe <[email protected]>
Fri, 22 Feb 2013 09:42:46 +0000 (10:42 +0100)
bd_openers is stable under bd_mutex, no need to check it twice.

Signed-off-by: Guo Chao <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Guo Chao <[email protected]>
Cc: M. Hindess <[email protected]>
Cc: Nikanth Karthikesan <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
fs/block_dev.c

index 82b7c9ad29acef2eab0c20439de63fe7e8cd7b4b..2f7058421ffb0abb2c67364324d6ab503db49786 100644 (file)
@@ -1119,7 +1119,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)
This page took 0.045019 seconds and 4 git commands to generate.