summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/delayed-ref.c
diff options
context:
space:
mode:
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>2018-10-11 13:40:34 +0800
committerDavid Sterba <dsterba@suse.com>2018-10-15 17:23:41 +0200
commit9e920a6f03e40b1eb712f38b29ad5880153754e2 (patch)
tree22da687cabde20bd2e7e1b03189b48b472ec7226 /fs/btrfs/delayed-ref.c
parent5637c74b01458d4bc392c2bb721bd102f316ad2d (diff)
downloadlinux-9e920a6f03e40b1eb712f38b29ad5880153754e2.tar.gz
linux-9e920a6f03e40b1eb712f38b29ad5880153754e2.tar.bz2
linux-9e920a6f03e40b1eb712f38b29ad5880153754e2.zip
btrfs: delayed-ref: pass delayed_refs directly to btrfs_delayed_ref_lock
Since trans is only used for referring to delayed_refs, there is no need to pass it instead of delayed_refs to btrfs_delayed_ref_lock(). No functional change. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/delayed-ref.c')
-rw-r--r--fs/btrfs/delayed-ref.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 59a8c0565a24..5d8f6d505d5a 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -204,12 +204,9 @@ static struct btrfs_delayed_ref_head* find_ref_head(
return NULL;
}
-int btrfs_delayed_ref_lock(struct btrfs_trans_handle *trans,
+int btrfs_delayed_ref_lock(struct btrfs_delayed_ref_root *delayed_refs,
struct btrfs_delayed_ref_head *head)
{
- struct btrfs_delayed_ref_root *delayed_refs;
-
- delayed_refs = &trans->transaction->delayed_refs;
lockdep_assert_held(&delayed_refs->lock);
if (mutex_trylock(&head->mutex))
return 0;