Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de33127d authored by Guo Chao's avatar Guo Chao Committed by Jens Axboe
Browse files

block: remove redundant check to bd_openers()



bd_openers is stable under bd_mutex, no need to check it twice.

Signed-off-by: default avatarGuo 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d646a02a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)