Commit f994414e authored by Li Lingfeng's avatar Li Lingfeng Committed by openeuler-sync-bot
Browse files

Fix the default return value of dm_pool_dec_data_range()

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7LJO8


CVE: NA

--------------------------------

Commit 26d0b2da ("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: 26d0b2da ("dm thin metadata: check fail_io before using data_sm")
Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
(cherry picked from commit fafd0d9f)
parent 333b99fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {