Commit 555e1286 authored by Filipe Manana's avatar Filipe Manana Committed by Chris Mason

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: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 27a3507d
...@@ -7143,9 +7143,11 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock, ...@@ -7143,9 +7143,11 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock,
block_start, len, block_start, len,
orig_block_len, orig_block_len,
ram_bytes, type); ram_bytes, type);
if (IS_ERR(em)) if (IS_ERR(em)) {
ret = PTR_ERR(em);
goto unlock_err; goto unlock_err;
} }
}
ret = btrfs_add_ordered_extent_dio(inode, start, ret = btrfs_add_ordered_extent_dio(inode, start,
block_start, len, len, type); block_start, len, len, type);
......
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