From f72ad18e996338a8033aeb981e645f8dbf4e22c1 Mon Sep 17 00:00:00 2001 From: Liu Bo Date: Mon, 30 Jan 2017 12:24:37 -0800 Subject: Btrfs: pass delayed_refs directly to btrfs_find_delayed_ref_head All we need is @delayed_refs, all callers have get it ahead of calling btrfs_find_delayed_ref_head since lock needs to be acquired firstly, there is no reason to deference it again inside the function. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/btrfs/backref.c') diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 8299601a3549..db706595e631 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1284,7 +1284,7 @@ again: */ delayed_refs = &trans->transaction->delayed_refs; spin_lock(&delayed_refs->lock); - head = btrfs_find_delayed_ref_head(trans, bytenr); + head = btrfs_find_delayed_ref_head(delayed_refs, bytenr); if (head) { if (!mutex_trylock(&head->mutex)) { atomic_inc(&head->node.refs); -- cgit v1.2.3-55-g7522