Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH -next] Btrfs: return error code in btrfs_check_trunc_cache_free_space()
@ 2013-05-21  2:39 Wei Yongjun
  2013-05-22  1:35 ` Miao Xie
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-05-21  2:39 UTC (permalink / raw)
  To: chris.mason, miaox; +Cc: yongjun_wei, linux-btrfs

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(-)

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,


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

end of thread, other threads:[~2013-05-22  1:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-21  2:39 [PATCH -next] Btrfs: return error code in btrfs_check_trunc_cache_free_space() Wei Yongjun
2013-05-22  1:35 ` Miao Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox