diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-16 11:07:27 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:06:58 +0100 |
commit | 27965b6c2cad220f6c512334665808bf3d895e5e (patch) | |
tree | a92dcbdbe41313083e80f6770ae049786887fbd3 /fs/btrfs/ctree.h | |
parent | da17066c40472c2d6a1aab7bb0090c3d285531c9 (diff) | |
download | op-kernel-dev-27965b6c2cad220f6c512334665808bf3d895e5e.zip op-kernel-dev-27965b6c2cad220f6c512334665808bf3d895e5e.tar.gz |
btrfs: root->fs_info cleanup, btrfs_calc_{trans,trunc}_metadata_size
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 6a5c007..19b6bb2 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2535,20 +2535,20 @@ static inline gfp_t btrfs_alloc_write_mask(struct address_space *mapping) u64 btrfs_csum_bytes_to_leaves(struct btrfs_root *root, u64 csum_bytes); -static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_root *root, +static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_fs_info *fs_info, unsigned num_items) { - return root->fs_info->nodesize * BTRFS_MAX_LEVEL * 2 * num_items; + return fs_info->nodesize * BTRFS_MAX_LEVEL * 2 * num_items; } /* * Doing a truncate won't result in new nodes or leaves, just what we need for * COW. */ -static inline u64 btrfs_calc_trunc_metadata_size(struct btrfs_root *root, +static inline u64 btrfs_calc_trunc_metadata_size(struct btrfs_fs_info *fs_info, unsigned num_items) { - return root->fs_info->nodesize * BTRFS_MAX_LEVEL * num_items; + return fs_info->nodesize * BTRFS_MAX_LEVEL * num_items; } int btrfs_should_throttle_delayed_refs(struct btrfs_trans_handle *trans, |