summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/delayed-ref.c
diff options
context:
space:
mode:
authorLiu Bo2017-01-30 21:24:37 +0100
committerDavid Sterba2017-02-14 15:50:59 +0100
commitf72ad18e996338a8033aeb981e645f8dbf4e22c1 (patch)
treee1f9d0f9937fe7ee3212918aa421f11159b2cc6f /fs/btrfs/delayed-ref.c
parentBtrfs: remove unused trans in read_block_for_search (diff)
downloadkernel-qcow2-linux-f72ad18e996338a8033aeb981e645f8dbf4e22c1.tar.gz
kernel-qcow2-linux-f72ad18e996338a8033aeb981e645f8dbf4e22c1.tar.xz
kernel-qcow2-linux-f72ad18e996338a8033aeb981e645f8dbf4e22c1.zip
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/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 c66f487b76a7..a1b9ef2dfc4a 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -909,11 +909,8 @@ int btrfs_add_delayed_extent_op(struct btrfs_fs_info *fs_info,
* the head node if any where found, or NULL if not.
*/
struct btrfs_delayed_ref_head *
-btrfs_find_delayed_ref_head(struct btrfs_trans_handle *trans, u64 bytenr)
+btrfs_find_delayed_ref_head(struct btrfs_delayed_ref_root *delayed_refs, u64 bytenr)
{
- struct btrfs_delayed_ref_root *delayed_refs;
-
- delayed_refs = &trans->transaction->delayed_refs;
return find_ref_head(&delayed_refs->href_root, bytenr, 0);
}