[-next] Btrfs: return error code in btrfs_check_trunc_cache_free_space()
diff mbox

Message ID CAPgLHd99KGnuvOqOzKHveWLg1huNK1b9=PbC331nKrGXrGF54w@mail.gmail.com
State Accepted, archived
Headers show

Commit Message

Wei Yongjun May 21, 2013, 2:39 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return error code instead always return 0 from function
btrfs_check_trunc_cache_free_space().
Introduced by commit 7b61cd92242542944fc27024900c495a6a7b3396
(Btrfs: don't use global block reservation for inode cache truncation)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 fs/btrfs/free-space-cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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

Comments

Miao Xie May 22, 2013, 1:35 a.m. UTC | #1
On Tue, 21 May 2013 10:39:21 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return error code instead always return 0 from function
> btrfs_check_trunc_cache_free_space().
> Introduced by commit 7b61cd92242542944fc27024900c495a6a7b3396
> (Btrfs: don't use global block reservation for inode cache truncation)
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thanks for your fix.

Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>

> ---
>  fs/btrfs/free-space-cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index e530096..73577f4 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -213,7 +213,7 @@ int btrfs_check_trunc_cache_free_space(struct btrfs_root *root,
>  	else
>  		ret = 0;
>  	spin_unlock(&rsv->lock);
> -	return 0;
> +	return ret;
>  }
>  
>  int btrfs_truncate_free_space_cache(struct btrfs_root *root,
> 
> 

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

Patch
diff mbox

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index e530096..73577f4 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -213,7 +213,7 @@  int btrfs_check_trunc_cache_free_space(struct btrfs_root *root,
 	else
 		ret = 0;
 	spin_unlock(&rsv->lock);
-	return 0;
+	return ret;
 }
 
 int btrfs_truncate_free_space_cache(struct btrfs_root *root,