From 4b286cd1f51a9cb6056269dd50ba4745b2622df4 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 21 May 2013 02:39:21 +0000 Subject: [PATCH] Btrfs: return error code in btrfs_check_trunc_cache_free_space() 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 Reviewed-by: Miao Xie Signed-off-by: Josef Bacik --- 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 ed26a5793cf7..75172853d713 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, -- 2.20.1