diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-07-16 15:27:34 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-08-07 19:17:18 +0200 |
| commit | 3ccdd23e9f8f3e94981e6472645442dfd6a789ea (patch) | |
| tree | f7c1384a2d2159ff3fbb9d9b4c74de6dfbdf4989 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 31ffb32245be3049f040bf65aaba33fef3a39b21 (diff) | |
btrfs: check for exit condition after waking in wait_log_commit()
We check for the exit condition after we add ourselves to the wait queue
and before we unlock the root's log_mutex, sleep and lock again log_mutex.
This is not incorrect, but it's not optimal since in the first iteration
this is pointless because we already know that root->log_commit[index] is
not zero, so we should check the exit condition only after unlocking
log_mutex, sleeping, waking up and locking again the log_mutex.
So move the check for the exit condition to bottom of the loop, after we
were woken and locked log_mutex again.
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
