summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/delayed-ref.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-12-19 08:10:10 +0000
committerJosef Bacik <jbacik@fusionio.com>2013-02-20 09:36:41 -0500
commit093486c453a55230ccdad4b48863b872fe68c46e (patch)
tree5e66183feabea18cca133d4688d7adbdf0110360 /fs/btrfs/delayed-ref.c
parent0e8c36a9fd8169a8b96c2ddc8446894bcd07b6b1 (diff)
downloadtalos-obmc-linux-093486c453a55230ccdad4b48863b872fe68c46e.tar.gz
talos-obmc-linux-093486c453a55230ccdad4b48863b872fe68c46e.zip
Btrfs: make delayed ref lock logic more readable
Locking and unlocking delayed ref mutex are in the different functions, and the name of lock functions is not uniform, so the readability is not so good, this patch optimizes the lock logic and makes it more readable. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/delayed-ref.c')
-rw-r--r--fs/btrfs/delayed-ref.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 455894f1ca3b..b7a0641ead77 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -426,6 +426,14 @@ again:
return 1;
}
+void btrfs_release_ref_cluster(struct list_head *cluster)
+{
+ struct list_head *pos, *q;
+
+ list_for_each_safe(pos, q, cluster)
+ list_del_init(pos);
+}
+
/*
* helper function to update an extent delayed ref in the
* rbtree. existing and update must both have the same
OpenPOWER on IntegriCloud