diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-08-21 20:34:37 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2024-09-03 21:15:44 -0700 |
| commit | 32f51ead3d7771cdec29f75e08d50a76d2c6253d (patch) | |
| tree | 6e0a9b32d4ee97c7bbcb41d6228dc12390f92067 /mm/shmem.c | |
| parent | 6f394ee9ddb4bd1879e42c9c8648a37f650bea99 (diff) | |
| download | net-32f51ead3d7771cdec29f75e08d50a76d2c6253d.tar.gz | |
mm: remove PageSwapCache
This flag is now only used on folios, so we can remove all the page
accessors and reword the comments that refer to them.
Link: https://lkml.kernel.org/r/20240821193445.2294269-5-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/shmem.c')
| -rw-r--r-- | mm/shmem.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 1448a7a9a282ab..866d46d0c43dcb 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -502,8 +502,8 @@ static int shmem_replace_entry(struct address_space *mapping, * Sometimes, before we decide whether to proceed or to fail, we must check * that an entry was not already brought back from swap by a racing thread. * - * Checking page is not enough: by the time a SwapCache page is locked, it - * might be reused, and again be SwapCache, using the same swap as before. + * Checking folio is not enough: by the time a swapcache folio is locked, it + * might be reused, and again be swapcache, using the same swap as before. */ static bool shmem_confirm_swap(struct address_space *mapping, pgoff_t index, swp_entry_t swap) @@ -1965,9 +1965,10 @@ static int shmem_replace_folio(struct folio **foliop, gfp_t gfp, if (unlikely(error)) { /* - * Is this possible? I think not, now that our callers check - * both PageSwapCache and page_private after getting page lock; - * but be defensive. Reverse old to newpage for clear and free. + * Is this possible? I think not, now that our callers + * check both the swapcache flag and folio->private + * after getting the folio lock; but be defensive. + * Reverse old to newpage for clear and free. */ old = new; } else { |
