linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: set error return value in btrfs_get_blocks_direct
@ 2014-07-07 11:35 Filipe Manana
  2014-07-10  2:30 ` Satoru Takeuchi
  0 siblings, 1 reply; 2+ messages in thread
From: Filipe Manana @ 2014-07-07 11:35 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Filipe Manana

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>
---
 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,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Btrfs: set error return value in btrfs_get_blocks_direct
  2014-07-07 11:35 [PATCH] Btrfs: set error return value in btrfs_get_blocks_direct Filipe Manana
@ 2014-07-10  2:30 ` Satoru Takeuchi
  0 siblings, 0 replies; 2+ messages in thread
From: Satoru Takeuchi @ 2014-07-10  2:30 UTC (permalink / raw)
  To: Filipe Manana, linux-btrfs

(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 <fdmanana@suse.com>

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@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,
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-10  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 11:35 [PATCH] Btrfs: set error return value in btrfs_get_blocks_direct Filipe Manana
2014-07-10  2:30 ` Satoru Takeuchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).