dm mpath selector: fix uninitialized value warning
PATCH 1/1 dm mpath selector: fix uninitialized value warning
This fixes an issue reproted by Colin King where the cpu variable is used before being initialized. We can just use kzalloc) here, because using kzalloc_node did not provide any benefit.
Reported-by Colin Ian King <[email protected]>
Signed-off-by Mike Christie <[email protected]>
--- drivers/md/dm-ps-io-affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-ps-io-affinity.c +1 -1
@@ -53,7 +53,7 @@ static int ioa_add_path(struct path_selector *ps, struct dm_path *path,return -EINVAL ; } - pi =kzalloc_node (sizeof (*pi),GFP_KERNEL ,cpu_to_node (cpu)); + pi =kzalloc (sizeof (*pi),GFP_KERNEL );if (!pi) { *error ="io-affinity ps: Error allocating path context" ;return -ENOMEM ;
Signature · 6 lines
1.8.3.1 -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel