hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8S3GW CVE: NA
---------------------------
The count of bd_writers can have other uses and it doesn't block writes when bdev_allow_write_mounted is not set, so delete the restriction for counting it.
Signed-off-by: Li Lingfeng lilingfeng3@huawei.com --- block/bdev.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/block/bdev.c b/block/bdev.c index dd39c26c44ad..4e36cb6fd887 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -762,9 +762,6 @@ static bool bdev_may_open(struct block_device *bdev, blk_mode_t mode)
static void bdev_claim_write_access(struct block_device *bdev, blk_mode_t mode) { - if (bdev_allow_write_mounted) - return; - /* Claim exclusive or shared write access. */ if (mode & BLK_OPEN_RESTRICT_WRITES) bdev_block_writes(bdev); @@ -774,9 +771,6 @@ static void bdev_claim_write_access(struct block_device *bdev, blk_mode_t mode)
static void bdev_yield_write_access(struct block_device *bdev, blk_mode_t mode) { - if (bdev_allow_write_mounted) - return; - /* Yield exclusive or shared write access. */ if (mode & BLK_OPEN_RESTRICT_WRITES) bdev_unblock_writes(bdev);