diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-20 11:47:46 +0530 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-10-30 12:27:57 +0100 |
commit | 3afb0c501414aa3c4a7cfea9ae1a0acfbf7be14f (patch) | |
tree | 6305da2de8724fa4d62e8988aa766c94ad86f548 /fs/btrfs/check-integrity.c | |
parent | 6939f667247ed792535c0697a99f600d6770f127 (diff) | |
download | linux-3afb0c501414aa3c4a7cfea9ae1a0acfbf7be14f.tar.gz linux-3afb0c501414aa3c4a7cfea9ae1a0acfbf7be14f.tar.bz2 linux-3afb0c501414aa3c4a7cfea9ae1a0acfbf7be14f.zip |
btrfs: return -ENOMEM on allocation failure in btrfsic
Forward the correct return value -ENOMEM from btrfsic_dev_state_alloc()
too.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ adjust changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/check-integrity.c')
-rw-r--r-- | fs/btrfs/check-integrity.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 7d5a9b51f0d7..9db1e7602dfc 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c @@ -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; |