提交 5132acd1 编写于 作者: B Baokun Li 提交者: Zheng Zengkai

dm ioctl: print error when HC and MD do not match

hulk inclusion
category: bugfix
bugzilla: 187327,https://gitee.com/openeuler/kernel/issues/I6111I
CVE: NA

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

Print error when hc and md do not match, which is convenient for locating
the cause of the problem
Signed-off-by: NBaokun Li <libaokun1@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e820e03b
......@@ -2033,6 +2033,8 @@ int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid)
mutex_lock(&dm_hash_cells_mutex);
hc = dm_get_mdptr(md);
if (!hc || hc->md != md) {
if (hc)
DMERR("hash cell and mapped device do not match!");
r = -ENXIO;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册