All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/6] Btrfs: fix unreleased path in btrfs_orphan_cleanup()
@ 2011-11-10  6:27 Miao Xie
  0 siblings, 0 replies; only message in thread
From: Miao Xie @ 2011-11-10  6:27 UTC (permalink / raw)
  To: Linux Btrfs

When we did stress test for the space relocation, the deadlock happened.
By debugging, We found it was caused by the carelessness that we forgot
to unlock the read lock of the extent buffers in btrfs_orphan_cleanup()
before we end the transaction handle, so the transaction commit task waited
the task, which called btrfs_orphan_cleanup(), to unlock the extent buffer,
but that task waited the commit task to end the transaction commit, and
the deadlock happened. Fix it.

Signed-ff-by: Miao Xie <miaox@cn.fujitsu.com>
---
 fs/btrfs/inode.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c5dd958..d7cd558 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2203,6 +2203,9 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
 		if (ret)
 			goto out;
 	}
+	/* release the path since we're done with it */
+	btrfs_release_path(path);
+
 	root->orphan_cleanup_state = ORPHAN_CLEANUP_DONE;
 
 	if (root->orphan_block_rsv)
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-10  6:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10  6:27 [PATCH 3/6] Btrfs: fix unreleased path in btrfs_orphan_cleanup() Miao Xie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.