btrfs: get fs_info from trans in btrfs_write_dirty_block_groups

We can read fs_info from the transaction and can drop it from the
parameters.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2019-03-20 12:04:08 +01:00
Родитель bbebb3e0ba
Коммит 5742d15fa7
3 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -2767,8 +2767,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
u64 root_objectid, u64 owner, u64 offset); u64 root_objectid, u64 owner, u64 offset);
int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans); int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans);
int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans);
struct btrfs_fs_info *fs_info);
int btrfs_setup_space_cache(struct btrfs_trans_handle *trans); int btrfs_setup_space_cache(struct btrfs_trans_handle *trans);
int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr); int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr);
int btrfs_free_block_groups(struct btrfs_fs_info *info); int btrfs_free_block_groups(struct btrfs_fs_info *info);

Просмотреть файл

@ -3736,9 +3736,9 @@ again:
return ret; return ret;
} }
int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans)
struct btrfs_fs_info *fs_info)
{ {
struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_block_group_cache *cache; struct btrfs_block_group_cache *cache;
struct btrfs_transaction *cur_trans = trans->transaction; struct btrfs_transaction *cur_trans = trans->transaction;
int ret = 0; int ret = 0;

Просмотреть файл

@ -1132,7 +1132,7 @@ again:
} }
while (!list_empty(dirty_bgs) || !list_empty(io_bgs)) { while (!list_empty(dirty_bgs) || !list_empty(io_bgs)) {
ret = btrfs_write_dirty_block_groups(trans, fs_info); ret = btrfs_write_dirty_block_groups(trans);
if (ret) if (ret)
return ret; return ret;
ret = btrfs_run_delayed_refs(trans, (unsigned long)-1); ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);