diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-02-10 12:08:56 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-04-07 18:55:56 +0200 |
| commit | 521f8672b6b34a8959f8b5a5859364e52aa1ba8a (patch) | |
| tree | c7f731467d371a112d4ca59aa87a992fdc94ed2a | |
| parent | b943097758ffa35dba31053de927d1cbb40a1bf5 (diff) | |
| download | linux-next-521f8672b6b34a8959f8b5a5859364e52aa1ba8a.tar.gz linux-next-521f8672b6b34a8959f8b5a5859364e52aa1ba8a.zip | |
btrfs: remove pointless out label in qgroup_account_snapshot()
The 'out' label is pointless as there are no cleanups to perform there,
we can replace every goto with a direct return.
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>
| -rw-r--r-- | fs/btrfs/transaction.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 77249dcbd7b4..2df80452b0b7 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1602,16 +1602,16 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans, ret = commit_fs_roots(trans); if (ret) - goto out; + return ret; ret = btrfs_qgroup_account_extents(trans); if (ret < 0) - goto out; + return ret; /* Now qgroup are all updated, we can inherit it to new qgroups */ ret = btrfs_qgroup_inherit(trans, btrfs_root_id(src), dst_objectid, btrfs_root_id(parent), inherit); if (ret < 0) - goto out; + return ret; /* * Now we do a simplified commit transaction, which will: @@ -1627,23 +1627,22 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans, */ ret = commit_cowonly_roots(trans); if (ret) - goto out; + return ret; switch_commit_roots(trans); ret = btrfs_write_and_wait_transaction(trans); - if (unlikely(ret)) + if (unlikely(ret)) { btrfs_err(fs_info, "error while writing out transaction during qgroup snapshot accounting: %d", ret); + return ret; + } -out: /* * Force parent root to be updated, as we recorded it before so its * last_trans == cur_transid. * Or it won't be committed again onto disk after later * insert_dir_item() */ - if (!ret) - ret = record_root_in_trans(trans, parent, 1); - return ret; + return record_root_in_trans(trans, parent, 1); } /* |
