summaryrefslogtreecommitdiff
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2017-01-30 23:24:37 +0300
committerDavid Sterba <dsterba@suse.com>2017-02-14 17:50:59 +0300
commitf72ad18e996338a8033aeb981e645f8dbf4e22c1 (patch)
treee1f9d0f9937fe7ee3212918aa421f11159b2cc6f /fs/btrfs/backref.c
parentd07b85284f83dee7955cb43dc66a37542a725c12 (diff)
downloadlinux-f72ad18e996338a8033aeb981e645f8dbf4e22c1.tar.xz
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 <bo.li.liu@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r--fs/btrfs/backref.c2
1 files changed, 1 insertions, 1 deletions
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);