aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/delayed-ref.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-12-19 03:10:10 -0500
committerJosef Bacik <jbacik@fusionio.com>2013-02-20 09:36:41 -0500
commit093486c453a55230ccdad4b48863b872fe68c46e (patch)
tree5e66183feabea18cca133d4688d7adbdf0110360 /fs/btrfs/delayed-ref.c
parent0e8c36a9fd8169a8b96c2ddc8446894bcd07b6b1 (diff)
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:
426 return 1; 426 return 1;
427} 427}
428 428
429void btrfs_release_ref_cluster(struct list_head *cluster)
430{
431 struct list_head *pos, *q;
432
433 list_for_each_safe(pos, q, cluster)
434 list_del_init(pos);
435}
436
429/* 437/*
430 * helper function to update an extent delayed ref in the 438 * helper function to update an extent delayed ref in the
431 * rbtree. existing and update must both have the same 439 * rbtree. existing and update must both have the same