Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] Btrfs: add a missing block_rsv reset
@ 2011-10-20  9:25 Liu Bo
  2011-10-20 12:49 ` Josef Bacik
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Bo @ 2011-10-20  9:25 UTC (permalink / raw)
  To: linux-btrfs; +Cc: chris.mason, josef, chb

In commit ab1ca99b51df63901617b9f10f9a36d5d4972d78
(Btrfs: reset to appropriate block rsv after orphan operations),
we miss a block_rsv reset and this sometimes leads us to
the WARNING of btrfs_orphan_commit_root().

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
---
 fs/btrfs/free-space-cache.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 41ac927..d96815c 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -199,8 +199,10 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root,
 	ret = btrfs_block_rsv_check(trans, root,
 				    root->orphan_block_rsv,
 				    0, 5);
-	if (ret)
+	if (ret) {
+		trans->block_rsv = rsv;
 		return ret;
+	}
 
 	oldsize = i_size_read(inode);
 	btrfs_i_size_write(inode, 0);
-- 
1.6.5.2


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

end of thread, other threads:[~2011-10-20 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20  9:25 [PATCH] Btrfs: add a missing block_rsv reset Liu Bo
2011-10-20 12:49 ` Josef Bacik

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