Commit 1eb197e6 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: erroneous sizeof use in raid1

This isn't a real bug as the smallest slab-size is 32 bytes but please
apply for consistency.

Found by the Coverity tool.
Signed-off-by: default avatarAlexander Nyberg <alexn@dsv.su.se>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c6bbef68
...@@ -1346,7 +1346,7 @@ static int raid1_reshape(mddev_t *mddev, int raid_disks) ...@@ -1346,7 +1346,7 @@ static int raid1_reshape(mddev_t *mddev, int raid_disks)
if (conf->mirrors[d].rdev) if (conf->mirrors[d].rdev)
return -EBUSY; return -EBUSY;
newpoolinfo = kmalloc(sizeof(newpoolinfo), GFP_KERNEL); newpoolinfo = kmalloc(sizeof(*newpoolinfo), GFP_KERNEL);
if (!newpoolinfo) if (!newpoolinfo)
return -ENOMEM; return -ENOMEM;
newpoolinfo->mddev = mddev; newpoolinfo->mddev = mddev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment