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>
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);
}