Commit ebc24337 authored by Andre Noll's avatar Andre Noll Committed by Neil Brown

md: alloc_disk_sb(): Return proper error value.

If alloc_page() fails, ENOMEM is a more suitable error value
than EINVAL.
Signed-off-by: default avatarAndre Noll <maan@systemlinux.org>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
parent ce0c8e05
......@@ -372,7 +372,7 @@ static int alloc_disk_sb(mdk_rdev_t * rdev)
rdev->sb_page = alloc_page(GFP_KERNEL);
if (!rdev->sb_page) {
printk(KERN_ALERT "md: out of memory.\n");
return -EINVAL;
return -ENOMEM;
}
return 0;
......
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