diff options
author | Josef Bacik <josef@toxicpanda.com> | 2018-11-21 20:05:42 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-02-25 14:13:25 +0100 |
commit | 119e80df7d49e3794ca6d18afecd0cce948cad94 (patch) | |
tree | ca870b175ea2b1596206091af074dd19630ab8d2 /fs/btrfs/transaction.c | |
parent | btrfs: make btrfs_destroy_delayed_refs use btrfs_delete_ref_head (diff) | |
download | linux-119e80df7d49e3794ca6d18afecd0cce948cad94.tar.xz linux-119e80df7d49e3794ca6d18afecd0cce948cad94.zip |
btrfs: call btrfs_create_pending_block_groups unconditionally
The first thing we do is loop through the list, this
if (!list_empty())
btrfs_create_pending_block_groups();
thing is just wasted space.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 4ec2b660d014..fdffe5d61739 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -845,8 +845,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, btrfs_trans_release_metadata(trans); trans->block_rsv = NULL; - if (!list_empty(&trans->new_bgs)) - btrfs_create_pending_block_groups(trans); + btrfs_create_pending_block_groups(trans); btrfs_trans_release_chunk_metadata(trans); @@ -1943,8 +1942,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) cur_trans->delayed_refs.flushing = 1; smp_wmb(); - if (!list_empty(&trans->new_bgs)) - btrfs_create_pending_block_groups(trans); + btrfs_create_pending_block_groups(trans); ret = btrfs_run_delayed_refs(trans, 0); if (ret) { |