diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-22 18:54:24 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:06:59 +0100 |
commit | 2ff7e61e0d30ff166a2ae94575526bffe11fd1a8 (patch) | |
tree | a2b8aba1d10c010cc247f3e0866dcbd627e852f3 /fs/btrfs/inode-item.c | |
parent | afdb571890615059ed4f0625209b379aff6cb08d (diff) |
btrfs: take an fs_info directly when the root is not used otherwise
There are loads of functions in btrfs that accept a root parameter
but only use it to obtain an fs_info pointer. Let's convert those to
just accept an fs_info pointer directly.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode-item.c')
-rw-r--r-- | fs/btrfs/inode-item.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/inode-item.c b/fs/btrfs/inode-item.c index 47270a3c9649..39c968f80157 100644 --- a/fs/btrfs/inode-item.c +++ b/fs/btrfs/inode-item.c @@ -182,7 +182,7 @@ static int btrfs_del_inode_extref(struct btrfs_trans_handle *trans, memmove_extent_buffer(leaf, ptr, ptr + del_len, item_size - (ptr + del_len - item_start)); - btrfs_truncate_item(root, path, item_size - del_len, 1); + btrfs_truncate_item(root->fs_info, path, item_size - del_len, 1); out: btrfs_free_path(path); @@ -245,7 +245,7 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans, item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, item_size - (ptr + sub_item_len - item_start)); - btrfs_truncate_item(root, path, item_size - sub_item_len, 1); + btrfs_truncate_item(root->fs_info, path, item_size - sub_item_len, 1); out: btrfs_free_path(path); @@ -297,7 +297,7 @@ static int btrfs_insert_inode_extref(struct btrfs_trans_handle *trans, name, name_len, NULL)) goto out; - btrfs_extend_item(root, path, ins_len); + btrfs_extend_item(root->fs_info, path, ins_len); ret = 0; } if (ret < 0) @@ -355,7 +355,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, goto out; old_size = btrfs_item_size_nr(path->nodes[0], path->slots[0]); - btrfs_extend_item(root, path, ins_len); + btrfs_extend_item(fs_info, path, ins_len); ref = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_inode_ref); ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size); |