diff options
author | 2025-05-01 12:23:17 +0100 | |
---|---|---|
committer | 2025-05-15 14:30:54 +0200 | |
commit | a20f732822833f7e3c8b3aa8628159d5c12e7648 (patch) | |
tree | d310003ba4025eddaed7398932755d4f1b6acae8 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | btrfs: simplify getting and extracting previous transaction during commit (diff) | |
download | linux-rng-a20f732822833f7e3c8b3aa8628159d5c12e7648.tar.xz linux-rng-a20f732822833f7e3c8b3aa8628159d5c12e7648.zip |
btrfs: simplify getting and extracting previous transaction at clean_pinned_extents()
Instead of detecting if there is a previous transaction by comparing the
current transaction's list prev member to the head of the transaction
list (fs_info->trans_list), use the list_is_first() helper which contains
that logic and the naming makes sense since a new transaction is always
added to the end of the list fs_info->trans_list with list_add_tail().
We are also extracting the previous transaction with list_last_entry()
against the transaction, which is correct but confusing because that
function is usually meant to be used against a pointer to the start of a
list and not a member of a list. It is easier to reason by either calling
list_first_entry() against the list fs_info->trans_list, since we can
never have more than two transactions in the list, or by calling
list_prev_entry() against the transaction. So change that to use the later
method.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions