From 093486c453a55230ccdad4b48863b872fe68c46e Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Wed, 19 Dec 2012 08:10:10 +0000 Subject: 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 Signed-off-by: Josef Bacik --- fs/btrfs/delayed-ref.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fs/btrfs/delayed-ref.c') 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 -- cgit v1.2.3