diff options
| author | Daniel Gomez <[email protected]> | 2024-08-12 07:42:04 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-09-04 04:15:34 +0000 |
| commit | 6ea0d1ccb110387244e04637f28a1d2eda54e3fb (patch) | |
| tree | 84c47de619d7b6915c83557586018b459c15a205 /mm/filemap.c | |
| parent | mm: shmem: extend shmem_partial_swap_usage() to support large folio swap (diff) | |
| download | kernel-6ea0d1ccb110387244e04637f28a1d2eda54e3fb.tar.gz kernel-6ea0d1ccb110387244e04637f28a1d2eda54e3fb.zip | |
mm: shmem: return number of pages beeing freed in shmem_free_swap
Both shmem_free_swap callers expect the number of pages being freed. In
the large folios context, this needs to support larger values other than 0
(used as 1 page being freed) and -ENOENT (used as 0 pages being freed).
In preparation for large folios adoption, make shmem_free_swap routine
return the number of pages being freed. So, returning 0 in this context,
means 0 pages being freed.
While we are at it, changing to use free_swap_and_cache_nr() to free large
order swap entry by Baolin Wang.
Link: https://lkml.kernel.org/r/9623e863c83d749d5ab407f6fdf0a8e5a3bdf052.1723434324.git.baolin.wang@linux.alibaba.com
Signed-off-by: Daniel Gomez <[email protected]>
Signed-off-by: Baolin Wang <[email protected]>
Suggested-by: Matthew Wilcox <[email protected]>
Cc: Barry Song <[email protected]>
Cc: Chris Li <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: "Huang, Ying" <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Kefeng Wang <[email protected]>
Cc: Lance Yang <[email protected]>
Cc: Pankaj Raghav <[email protected]>
Cc: Ryan Roberts <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: Zi Yan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/filemap.c')
0 files changed, 0 insertions, 0 deletions
