Commit 3afb0c50 authored by Allen Pais's avatar Allen Pais Committed by David Sterba

btrfs: return -ENOMEM on allocation failure in btrfsic

Forward the correct return value -ENOMEM from btrfsic_dev_state_alloc()
too.
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
[ adjust changelog ]
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 6939f667
......@@ -2913,7 +2913,7 @@ int btrfsic_mount(struct btrfs_fs_info *fs_info,
state = kvzalloc(sizeof(*state), GFP_KERNEL);
if (!state) {
pr_info("btrfs check-integrity: allocation failed!\n");
return -1;
return -ENOMEM;
}
if (!btrfsic_is_initialized) {
......@@ -2945,7 +2945,7 @@ int btrfsic_mount(struct btrfs_fs_info *fs_info,
if (NULL == ds) {
pr_info("btrfs check-integrity: kmalloc() failed!\n");
mutex_unlock(&btrfsic_mutex);
return -1;
return -ENOMEM;
}
ds->bdev = device->bdev;
ds->state = state;
......
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