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 <colin.king@xxxxxxxxxxxxx> Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx> --- drivers/md/dm-ps-io-affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-ps-io-affinity.c b/drivers/md/dm-ps-io-affinity.c index 0da1e4d..a89f871 100644 --- a/drivers/md/dm-ps-io-affinity.c +++ b/drivers/md/dm-ps-io-affinity.c @@ -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; -- 1.8.3.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel