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:
Andre Noll 2008-07-11 22:02:20 +10:00 committed by Neil Brown
parent ce0c8e05f8
commit ebc2433728
1 changed files with 1 additions and 1 deletions

View File

@ -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;