md: alloc_disk_sb(): Return proper error value.
If alloc_page() fails, ENOMEM is a more suitable error value than EINVAL. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
parent
ce0c8e05f8
commit
ebc2433728
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue