* [PATCH] Btrfs: cleanup the left refs on the cluster list
@ 2013-02-09 6:42 Liu Bo
0 siblings, 0 replies; only message in thread
From: Liu Bo @ 2013-02-09 6:42 UTC (permalink / raw)
To: linux-btrfs; +Cc: miaox
When we're going to abort the transaction, we need to first do cleanup
work for the left refs on the cluster list, otherwise we'll get list_del
debug warnings.
(Taken from Miao's patch: Btrfs: fix deadlock when the process of delayed refs fails)
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
fs/btrfs/extent-tree.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 61da9d0..7e7884f 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2500,6 +2500,12 @@ again:
ret = run_clustered_refs(trans, root, &cluster);
if (ret < 0) {
+ if (!list_empty(&cluster)) {
+ struct list_head *pos, *next;
+
+ list_for_each_safe(pos, next, &cluster);
+ list_del_init(pos);
+ }
spin_unlock(&delayed_refs->lock);
btrfs_abort_transaction(trans, root, ret);
return ret;
--
1.7.7.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-09 6:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-09 6:42 [PATCH] Btrfs: cleanup the left refs on the cluster list Liu Bo
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).