diff options
author | David Sterba <dsterba@suse.com> | 2019-03-20 13:40:19 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:45 +0200 |
commit | 7949f3392ed65d19f0f6726e9e32445aa8b707dc (patch) | |
tree | b999fb75ede0735fcee799a3cc102ea6173aa0ed /fs/btrfs/free-space-cache.c | |
parent | fdf08605b95d36c04e90915cc0eb729df324c4bc (diff) | |
download | linux-7949f3392ed65d19f0f6726e9e32445aa8b707dc.tar.gz linux-7949f3392ed65d19f0f6726e9e32445aa8b707dc.tar.bz2 linux-7949f3392ed65d19f0f6726e9e32445aa8b707dc.zip |
btrfs: get fs_info from block group in lookup_free_space_inode
We can read fs_info from the block group cache structure and can drop it
from the parameters.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index c3120df95c8a..f30c1bc1dced 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -88,10 +88,11 @@ static struct inode *__lookup_free_space_inode(struct btrfs_root *root, return inode; } -struct inode *lookup_free_space_inode(struct btrfs_fs_info *fs_info, - struct btrfs_block_group_cache - *block_group, struct btrfs_path *path) +struct inode *lookup_free_space_inode( + struct btrfs_block_group_cache *block_group, + struct btrfs_path *path) { + struct btrfs_fs_info *fs_info = block_group->fs_info; struct inode *inode = NULL; u32 flags = BTRFS_INODE_NODATASUM | BTRFS_INODE_NODATACOW; @@ -857,7 +858,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, * once created get their ->cached field set to BTRFS_CACHE_FINISHED so * we will never try to read their inode item while the fs is mounted. */ - inode = lookup_free_space_inode(fs_info, block_group, path); + inode = lookup_free_space_inode(block_group, path); if (IS_ERR(inode)) { btrfs_free_path(path); return 0; @@ -1385,7 +1386,7 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans, } spin_unlock(&block_group->lock); - inode = lookup_free_space_inode(fs_info, block_group, path); + inode = lookup_free_space_inode(block_group, path); if (IS_ERR(inode)) return 0; |