summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2014-07-07 12:35:21 +0100
committerChris Mason <clm@fb.com>2014-09-17 13:37:32 -0700
commit555e12864063762964433139dee651c5b859a047 (patch)
tree6e5aaef75cb38968c76ec363c78f45ac94d7ba9a /fs/btrfs/inode.c
parent27a3507de91e3dd51a2cf8dca4b33623dd6eaa88 (diff)
downloadlinux-555e12864063762964433139dee651c5b859a047.tar.gz
linux-555e12864063762964433139dee651c5b859a047.tar.bz2
linux-555e12864063762964433139dee651c5b859a047.zip
Btrfs: set error return value in btrfs_get_blocks_direct
We were returning with 0 (success) because we weren't extracting the error code from em (PTR_ERR(em)). Fix it. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 2370d72972e9..177508abb865 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7143,8 +7143,10 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock,
block_start, len,
orig_block_len,
ram_bytes, type);
- if (IS_ERR(em))
+ if (IS_ERR(em)) {
+ ret = PTR_ERR(em);
goto unlock_err;
+ }
}
ret = btrfs_add_ordered_extent_dio(inode, start,