提交 3afb0c50 编写于 作者: A Allen Pais 提交者: 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: NAllen Pais <allen.lkml@gmail.com>
Reviewed-by: NAnand Jain <anand.jain@oracle.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
[ adjust changelog ]
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册