Commit 51ae3f4a authored by Kalesh Singh's avatar Kalesh Singh Committed by Andrew Morton
Browse files

mm/cma: fix placement of trace_cma_alloc_start/finish

The current placement of trace_cma_alloc_start/finish misses the fail
cases: !cma || !cma->count || !cma->bitmap.

trace_cma_alloc_finish is also not emitted for the failure case
where bitmap_count > bitmap_maxno.

Fix these missed cases by moving the start event before the failure
checks and moving the finish event to the out label.

Link: https://lkml.kernel.org/r/20240110012234.3793639-1-kaleshsingh@google.com


Fixes: 7bc1aec5 ("mm: cma: add trace events for CMA alloc perf testing")
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Liam Mark <lmark@codeaurora.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 2597c994
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment