hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7LJO8 CVE: NA
--------------------------------
Commit 26d0b2da7317 ("dm thin metadata: check fail_io before using data_sm") change the defalut return value of dm_pool_dec_data_range(), so fix it.
Fixes: 26d0b2da7317 ("dm thin metadata: check fail_io before using data_sm") Signed-off-by: Li Lingfeng lilingfeng3@huawei.com --- drivers/md/dm-thin-metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c index 69401bfac76e..551ae1cd3c43 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -1806,7 +1806,7 @@ int dm_pool_inc_data_range(struct dm_pool_metadata *pmd, dm_block_t b, dm_block_
int dm_pool_dec_data_range(struct dm_pool_metadata *pmd, dm_block_t b, dm_block_t e) { - int r = -EINVAL; + int r = 0;
pmd_write_lock(pmd); if (!pmd->fail_io) {