(2014/07/07 20:35), Filipe Manana wrote:
> 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 <fdman...@suse.com>

Reviewed-by: Satoru Takeuchi <takeuchi_sat...@jp.fujitsu.com>

> ---
>   fs/btrfs/inode.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 6b65fab..8a946c0 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -6998,8 +6998,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,
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to