diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1669c3b4be2f..99a9c25d36a6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -714,8 +714,10 @@ retry: | |||
714 | async_extent->ram_size - 1, 0); | 714 | async_extent->ram_size - 1, 0); |
715 | 715 | ||
716 | em = alloc_extent_map(); | 716 | em = alloc_extent_map(); |
717 | if (!em) | 717 | if (!em) { |
718 | ret = -ENOMEM; | ||
718 | goto out_free_reserve; | 719 | goto out_free_reserve; |
720 | } | ||
719 | em->start = async_extent->start; | 721 | em->start = async_extent->start; |
720 | em->len = async_extent->ram_size; | 722 | em->len = async_extent->ram_size; |
721 | em->orig_start = em->start; | 723 | em->orig_start = em->start; |
@@ -922,8 +924,10 @@ static noinline int __cow_file_range(struct btrfs_trans_handle *trans, | |||
922 | } | 924 | } |
923 | 925 | ||
924 | em = alloc_extent_map(); | 926 | em = alloc_extent_map(); |
925 | if (!em) | 927 | if (!em) { |
928 | ret = -ENOMEM; | ||
926 | goto out_reserve; | 929 | goto out_reserve; |
930 | } | ||
927 | em->start = start; | 931 | em->start = start; |
928 | em->orig_start = em->start; | 932 | em->orig_start = em->start; |
929 | ram_size = ins.offset; | 933 | ram_size = ins.offset; |