btrfs: get fs_info from block group in load_free_space_cache
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>
This commit is contained in:
parent
7949f3392e
commit
bb6cb1c5b9
@ -643,7 +643,7 @@ static int cache_block_group(struct btrfs_block_group_cache *cache,
|
|||||||
|
|
||||||
if (btrfs_test_opt(fs_info, SPACE_CACHE)) {
|
if (btrfs_test_opt(fs_info, SPACE_CACHE)) {
|
||||||
mutex_lock(&caching_ctl->mutex);
|
mutex_lock(&caching_ctl->mutex);
|
||||||
ret = load_free_space_cache(fs_info, cache);
|
ret = load_free_space_cache(cache);
|
||||||
|
|
||||||
spin_lock(&cache->lock);
|
spin_lock(&cache->lock);
|
||||||
if (ret == 1) {
|
if (ret == 1) {
|
||||||
|
@ -812,9 +812,9 @@ free_cache:
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
int load_free_space_cache(struct btrfs_fs_info *fs_info,
|
int load_free_space_cache(struct btrfs_block_group_cache *block_group)
|
||||||
struct btrfs_block_group_cache *block_group)
|
|
||||||
{
|
{
|
||||||
|
struct btrfs_fs_info *fs_info = block_group->fs_info;
|
||||||
struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
|
struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
struct btrfs_path *path;
|
struct btrfs_path *path;
|
||||||
|
@ -50,8 +50,7 @@ int btrfs_check_trunc_cache_free_space(struct btrfs_fs_info *fs_info,
|
|||||||
int btrfs_truncate_free_space_cache(struct btrfs_trans_handle *trans,
|
int btrfs_truncate_free_space_cache(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_block_group_cache *block_group,
|
struct btrfs_block_group_cache *block_group,
|
||||||
struct inode *inode);
|
struct inode *inode);
|
||||||
int load_free_space_cache(struct btrfs_fs_info *fs_info,
|
int load_free_space_cache(struct btrfs_block_group_cache *block_group);
|
||||||
struct btrfs_block_group_cache *block_group);
|
|
||||||
int btrfs_wait_cache_io(struct btrfs_trans_handle *trans,
|
int btrfs_wait_cache_io(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_block_group_cache *block_group,
|
struct btrfs_block_group_cache *block_group,
|
||||||
struct btrfs_path *path);
|
struct btrfs_path *path);
|
||||||
|
Loading…
Reference in New Issue
Block a user