[dm-devel] [PATCH 2/4] dm-ioctl: a small code cleanup
Mikulas Patocka
mpatocka at redhat.com
Tue Nov 1 20:54:01 UTC 2022
This is a small code cleanup in list_version_get_info. We don't need to
modify info->vers if we overwrite it immediatelly.
Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
---
drivers/md/dm-ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/drivers/md/dm-ioctl.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-ioctl.c 2022-11-01 16:17:58.000000000 +0100
+++ linux-2.6/drivers/md/dm-ioctl.c 2022-11-01 16:17:58.000000000 +0100
@@ -681,7 +681,7 @@ static void list_version_get_info(struct
strcpy(info->vers->name, tt->name);
info->old_vers = info->vers;
- info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1);
+ info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1);
}
static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name)
More information about the dm-devel
mailing list