summaryrefslogtreecommitdiff
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-06-21 10:40:19 -0400
committerDavid Sterba <dsterba@suse.com>2016-12-06 16:06:57 +0100
commit5b4aacefb8fbfc996e68b9b083d30f8bc0972449 (patch)
treecd4f1669a5bf9f8f2896c27f4b0d9d51e8a68e43 /fs/btrfs/file-item.c
parent515bdc479097ec9d5f389202842345af3162f71c (diff)
downloadlwn-5b4aacefb8fbfc996e68b9b083d30f8bc0972449.tar.gz
lwn-5b4aacefb8fbfc996e68b9b083d30f8bc0972449.zip
btrfs: call functions that overwrite their root parameter with fs_info
There are 11 functions that accept a root parameter and immediately overwrite it. We can pass those an fs_info pointer instead. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r--fs/btrfs/file-item.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 5e74178ba9d9..41c1145cbce1 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -590,8 +590,9 @@ static noinline void truncate_one_csum(struct btrfs_root *root,
* range of bytes.
*/
int btrfs_del_csums(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, u64 bytenr, u64 len)
+ struct btrfs_fs_info *fs_info, u64 bytenr, u64 len)
{
+ struct btrfs_root *root = fs_info->csum_root;
struct btrfs_path *path;
struct btrfs_key key;
u64 end_byte = bytenr + len;
@@ -601,8 +602,6 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,
u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy);
int blocksize_bits = root->fs_info->sb->s_blocksize_bits;
- root = root->fs_info->csum_root;
-
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;