mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 06:49:52 +00:00
mm/damon/paddr: improve readability of damon_pa_stat
damon_pa_stat contains an unnecessary goto statement, and the if/else can be re-written to be more readable. This patch is written on top of SJ's patch series [1], which in turn is written on top of another one of his series [2]. [1] https://lore.kernel.org/all/20241219040327.61902-1-sj@kernel.org/ [2] https://lore.kernel.org/all/20241213215306.54778-1-sj@kernel.org/ Link: https://lkml.kernel.org/r/20250113210201.446051-1-joshua.hahnjy@gmail.com Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
bdbe1d7bc3
commit
f57f63b0f0
@ -513,11 +513,8 @@ static unsigned long damon_pa_stat(struct damon_region *r, struct damos *s,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (damos_pa_filter_out(s, folio))
|
||||
goto put_folio;
|
||||
else
|
||||
if (!damos_pa_filter_out(s, folio))
|
||||
*sz_filter_passed += folio_size(folio);
|
||||
put_folio:
|
||||
addr += folio_size(folio);
|
||||
folio_put(folio);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user