diff options
author | Vishal Moola (Oracle) <[email protected]> | 2023-06-13 19:13:11 -0700 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-06-19 16:19:34 -0700 |
commit | 503670ee6d0670e114a66b8cf2bcd3f71f53c2f7 (patch) | |
tree | 082357361aabab6ca2012215da99a8a039206a96 /tools/perf/scripts/python/intel-pt-events.py | |
parent | c9223a4aede774b0cea2a9944bc5dac48683e802 (diff) |
mm/gup.c: reorganize try_get_folio()
try_get_folio() takes in a page, then chooses to do some folio operations
based on the flags (either FOLL_GET or FOLL_PIN). We can rewrite this
function to be more purpose oriented.
After calling try_get_folio(), if neither FOLL_GET nor FOLL_PIN are set,
warn and fail. If FOLL_GET is set we can return the result. If FOLL_GET
is not set then FOLL_PIN is set, so we pin the folio.
This change assists with folio conversions, and makes the function more
readable.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Vishal Moola (Oracle) <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions