diff options
| author | Filipe Manana <[email protected]> | 2025-05-01 11:47:35 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-05-15 12:30:54 +0000 |
| commit | d26d16a43272d714c06bf33509b84797863fcf9c (patch) | |
| tree | bbe12985ef68ffe7cebfa815bd89b5e81a25f87e /fs/btrfs/delayed-inode.c | |
| parent | btrfs: simplify getting and extracting previous transaction at clean_pinned_e... (diff) | |
| download | kernel-d26d16a43272d714c06bf33509b84797863fcf9c.tar.gz kernel-d26d16a43272d714c06bf33509b84797863fcf9c.zip | |
btrfs: simplify cow only root list extraction during transaction commit
There's no need to keep a local variable to extract the first member of
the list and then do a list_entry() call, we can use list_first_entry()
instead, removing the need for the temporary variable and extracting the
first element in a single step.
Also, there's no need to do a list_del_init() followed by list_add_tail(),
instead we can use list_move_tail(). We are in transaction commit critical
section where we don't need to worry about concurrency and that's why we
don't take any locks and can use list_move_tail() (we do assert early at
commit_cowonly_roots() that we are in the critical section, that the
transaction's state is TRANS_STATE_COMMIT_DOING).
Reviewed-by: Qu Wenruo <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/delayed-inode.c')
0 files changed, 0 insertions, 0 deletions
