mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
btrfs: remove fs_info parameter from btrfs_cleanup_one_transaction()
The fs_info parameter is redundant because it can be extracted from the transaction given as another parameter. So remove it and use the fs_info accessible from the transaction. Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2f6e05a5cc
commit
c3a5888e0f
@ -4183,7 +4183,7 @@ static void warn_about_uncommitted_trans(struct btrfs_fs_info *fs_info)
|
||||
btrfs_warn(fs_info,
|
||||
"transaction %llu (with %llu dirty metadata bytes) is not committed",
|
||||
trans->transid, dirty_bytes);
|
||||
btrfs_cleanup_one_transaction(trans, fs_info);
|
||||
btrfs_cleanup_one_transaction(trans);
|
||||
|
||||
if (trans == fs_info->running_transaction)
|
||||
fs_info->running_transaction = NULL;
|
||||
@ -4734,9 +4734,9 @@ static void btrfs_free_all_qgroup_pertrans(struct btrfs_fs_info *fs_info)
|
||||
spin_unlock(&fs_info->fs_roots_radix_lock);
|
||||
}
|
||||
|
||||
void btrfs_cleanup_one_transaction(struct btrfs_transaction *cur_trans,
|
||||
struct btrfs_fs_info *fs_info)
|
||||
void btrfs_cleanup_one_transaction(struct btrfs_transaction *cur_trans)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = cur_trans->fs_info;
|
||||
struct btrfs_device *dev, *tmp;
|
||||
|
||||
btrfs_cleanup_dirty_bgs(cur_trans, fs_info);
|
||||
@ -4794,7 +4794,7 @@ static int btrfs_cleanup_transaction(struct btrfs_fs_info *fs_info)
|
||||
} else {
|
||||
spin_unlock(&fs_info->trans_lock);
|
||||
}
|
||||
btrfs_cleanup_one_transaction(t, fs_info);
|
||||
btrfs_cleanup_one_transaction(t);
|
||||
|
||||
spin_lock(&fs_info->trans_lock);
|
||||
if (t == fs_info->running_transaction)
|
||||
|
@ -126,8 +126,7 @@ int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_root *root);
|
||||
void btrfs_cleanup_dirty_bgs(struct btrfs_transaction *trans,
|
||||
struct btrfs_fs_info *fs_info);
|
||||
void btrfs_cleanup_one_transaction(struct btrfs_transaction *trans,
|
||||
struct btrfs_fs_info *fs_info);
|
||||
void btrfs_cleanup_one_transaction(struct btrfs_transaction *trans);
|
||||
struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
|
||||
u64 objectid);
|
||||
int btrfs_get_num_tolerated_disk_barrier_failures(u64 flags);
|
||||
|
@ -2052,7 +2052,7 @@ static void cleanup_transaction(struct btrfs_trans_handle *trans, int err)
|
||||
|
||||
spin_unlock(&fs_info->trans_lock);
|
||||
|
||||
btrfs_cleanup_one_transaction(trans->transaction, fs_info);
|
||||
btrfs_cleanup_one_transaction(trans->transaction);
|
||||
|
||||
spin_lock(&fs_info->trans_lock);
|
||||
if (cur_trans == fs_info->running_transaction)
|
||||
|
Loading…
Reference in New Issue
Block a user