[dm-devel] [PATCH 03/14] libmultipath: use map instead of dm_task_get_name
lixiaokeng
lixiaokeng at huawei.com
Wed Sep 2 07:17:27 UTC 2020
In dm_mapname, dm_task_get_name(dmt) has been called and the return value
has been stored in map. Use map instead of second dm_task_get_name.
Signed-off-by: Lixiaokeng <lixiaokeng at huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26 at huawei.com>
Signed-off-by: Linfeilong <linfeilong at huawei.com>
---
libmultipath/devmapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index cc2de1df..b4d77cb6 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -1315,7 +1315,7 @@ dm_mapname(int major, int minor)
map = dm_task_get_name(dmt);
if (map && strlen(map))
- response = STRDUP((const char *)dm_task_get_name(dmt));
+ response = STRDUP((const char *)map);
dm_task_destroy(dmt);
return response;
--
More information about the dm-devel
mailing list