Commit fe041534 authored by David Sterba's avatar David Sterba

btrfs: get fs_info from trans in btrfs_write_out_cache

We can read fs_info from the transaction and can drop it from the
parameters.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4ca75f1b
...@@ -3644,8 +3644,7 @@ int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans) ...@@ -3644,8 +3644,7 @@ int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans)
if (cache->disk_cache_state == BTRFS_DC_SETUP) { if (cache->disk_cache_state == BTRFS_DC_SETUP) {
cache->io_ctl.inode = NULL; cache->io_ctl.inode = NULL;
ret = btrfs_write_out_cache(fs_info, trans, ret = btrfs_write_out_cache(trans, cache, path);
cache, path);
if (ret == 0 && cache->io_ctl.inode) { if (ret == 0 && cache->io_ctl.inode) {
num_started++; num_started++;
should_put = 0; should_put = 0;
...@@ -3800,8 +3799,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans) ...@@ -3800,8 +3799,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans)
if (!ret && cache->disk_cache_state == BTRFS_DC_SETUP) { if (!ret && cache->disk_cache_state == BTRFS_DC_SETUP) {
cache->io_ctl.inode = NULL; cache->io_ctl.inode = NULL;
ret = btrfs_write_out_cache(fs_info, trans, ret = btrfs_write_out_cache(trans, cache, path);
cache, path);
if (ret == 0 && cache->io_ctl.inode) { if (ret == 0 && cache->io_ctl.inode) {
num_started++; num_started++;
should_put = 0; should_put = 0;
......
...@@ -1369,11 +1369,11 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode, ...@@ -1369,11 +1369,11 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
goto out; goto out;
} }
int btrfs_write_out_cache(struct btrfs_fs_info *fs_info, int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
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)
{ {
struct btrfs_fs_info *fs_info = trans->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;
int ret = 0; int ret = 0;
......
...@@ -55,8 +55,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, ...@@ -55,8 +55,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
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);
int btrfs_write_out_cache(struct btrfs_fs_info *fs_info, int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
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);
struct inode *lookup_free_ino_inode(struct btrfs_root *root, struct inode *lookup_free_ino_inode(struct btrfs_root *root,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment