linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: use join_transaction in btrfs_evict_inode()
@ 2011-06-08  3:56 Li Zefan
  2011-06-08 13:52 ` Josef Bacik
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2011-06-08  3:56 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org; +Cc: Tsutomu Itoh

The WARN_ON() in start_transaction() was triggered while balancing.

The cause is btrfs_relocate_chunk() started a transaction and
then called iput() on the inode that stores free space cache,
and iput() called btrfs_start_transaction() again.

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 fs/btrfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 02ff4a1..4e9aa28 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3646,7 +3646,7 @@ void btrfs_evict_inode(struct inode *inode)
 	btrfs_i_size_write(inode, 0);
 
 	while (1) {
-		trans = btrfs_start_transaction(root, 0);
+		trans = btrfs_join_transaction(root);
 		BUG_ON(IS_ERR(trans));
 		trans->block_rsv = root->orphan_block_rsv;
 
-- 1.7.3.1 

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

* Re: [PATCH] Btrfs: use join_transaction in btrfs_evict_inode()
  2011-06-08  3:56 [PATCH] Btrfs: use join_transaction in btrfs_evict_inode() Li Zefan
@ 2011-06-08 13:52 ` Josef Bacik
  0 siblings, 0 replies; 2+ messages in thread
From: Josef Bacik @ 2011-06-08 13:52 UTC (permalink / raw)
  To: Li Zefan; +Cc: linux-btrfs@vger.kernel.org, Tsutomu Itoh

On 06/07/2011 11:56 PM, Li Zefan wrote:
> The WARN_ON() in start_transaction() was triggered while balancing.
> 
> The cause is btrfs_relocate_chunk() started a transaction and
> then called iput() on the inode that stores free space cache,
> and iput() called btrfs_start_transaction() again.
> 
> Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

Reviewed-by: Josef Bacik <josef@redhat.com>

Thanks,

Josef

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

end of thread, other threads:[~2011-06-08 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-08  3:56 [PATCH] Btrfs: use join_transaction in btrfs_evict_inode() Li Zefan
2011-06-08 13:52 ` Josef Bacik

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