From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, willy@infradead.org,
akpm@linux-foundation.org
Subject: [merged mm-stable] mm-swap-convert-put_swap_page-to-put_swap_folio.patch removed from -mm tree
Date: Mon, 03 Oct 2022 14:04:50 -0700 [thread overview]
Message-ID: <20221003210450.CFC94C433D7@smtp.kernel.org> (raw)
The quilt patch titled
Subject: mm/swap: convert put_swap_page() to put_swap_folio()
has been removed from the -mm tree. Its filename was
mm-swap-convert-put_swap_page-to-put_swap_folio.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: mm/swap: convert put_swap_page() to put_swap_folio()
Date: Fri, 2 Sep 2022 20:46:09 +0100
With all callers now using a folio, we can convert this function.
Link: https://lkml.kernel.org/r/20220902194653.1739778-14-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/swap.h | 4 ++--
mm/shmem.c | 2 +-
mm/swap_slots.c | 2 +-
mm/swap_state.c | 6 +++---
mm/swapfile.c | 4 ++--
mm/vmscan.c | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
--- a/include/linux/swap.h~mm-swap-convert-put_swap_page-to-put_swap_folio
+++ a/include/linux/swap.h
@@ -491,7 +491,7 @@ static inline long get_nr_swap_pages(voi
extern void si_swapinfo(struct sysinfo *);
swp_entry_t folio_alloc_swap(struct folio *folio);
bool folio_free_swap(struct folio *folio);
-extern void put_swap_page(struct page *page, swp_entry_t entry);
+void put_swap_folio(struct folio *folio, swp_entry_t entry);
extern swp_entry_t get_swap_page_of_type(int);
extern int get_swap_pages(int n, swp_entry_t swp_entries[], int entry_size);
extern int add_swap_count_continuation(swp_entry_t, gfp_t);
@@ -576,7 +576,7 @@ static inline void swap_free(swp_entry_t
{
}
-static inline void put_swap_page(struct page *page, swp_entry_t swp)
+static inline void put_swap_folio(struct folio *folio, swp_entry_t swp)
{
}
--- a/mm/shmem.c~mm-swap-convert-put_swap_page-to-put_swap_folio
+++ a/mm/shmem.c
@@ -1424,7 +1424,7 @@ static int shmem_writepage(struct page *
}
mutex_unlock(&shmem_swaplist_mutex);
- put_swap_page(&folio->page, swap);
+ put_swap_folio(folio, swap);
redirty:
folio_mark_dirty(folio);
if (wbc->for_reclaim)
--- a/mm/swapfile.c~mm-swap-convert-put_swap_page-to-put_swap_folio
+++ a/mm/swapfile.c
@@ -1332,7 +1332,7 @@ void swap_free(swp_entry_t entry)
/*
* Called after dropping swapcache to decrease refcnt to swap entries.
*/
-void put_swap_page(struct page *page, swp_entry_t entry)
+void put_swap_folio(struct folio *folio, swp_entry_t entry)
{
unsigned long offset = swp_offset(entry);
unsigned long idx = offset / SWAPFILE_CLUSTER;
@@ -1341,7 +1341,7 @@ void put_swap_page(struct page *page, sw
unsigned char *map;
unsigned int i, free_entries = 0;
unsigned char val;
- int size = swap_entry_size(thp_nr_pages(page));
+ int size = swap_entry_size(folio_nr_pages(folio));
si = _swap_info_get(entry);
if (!si)
--- a/mm/swap_slots.c~mm-swap-convert-put_swap_page-to-put_swap_folio
+++ a/mm/swap_slots.c
@@ -343,7 +343,7 @@ repeat:
get_swap_pages(1, &entry, 1);
out:
if (mem_cgroup_try_charge_swap(folio, entry)) {
- put_swap_page(&folio->page, entry);
+ put_swap_folio(folio, entry);
entry.val = 0;
}
return entry;
--- a/mm/swap_state.c~mm-swap-convert-put_swap_page-to-put_swap_folio
+++ a/mm/swap_state.c
@@ -218,7 +218,7 @@ bool add_to_swap(struct folio *folio)
return true;
fail:
- put_swap_page(&folio->page, entry);
+ put_swap_folio(folio, entry);
return false;
}
@@ -237,7 +237,7 @@ void delete_from_swap_cache(struct folio
__delete_from_swap_cache(folio, entry, NULL);
xa_unlock_irq(&address_space->i_pages);
- put_swap_page(&folio->page, entry);
+ put_swap_folio(folio, entry);
folio_ref_sub(folio, folio_nr_pages(folio));
}
@@ -498,7 +498,7 @@ struct page *__read_swap_cache_async(swp
return &folio->page;
fail_unlock:
- put_swap_page(&folio->page, entry);
+ put_swap_folio(folio, entry);
folio_unlock(folio);
folio_put(folio);
return NULL;
--- a/mm/vmscan.c~mm-swap-convert-put_swap_page-to-put_swap_folio
+++ a/mm/vmscan.c
@@ -1352,7 +1352,7 @@ static int __remove_mapping(struct addre
mem_cgroup_swapout(folio, swap);
__delete_from_swap_cache(folio, swap, shadow);
xa_unlock_irq(&mapping->i_pages);
- put_swap_page(&folio->page, swap);
+ put_swap_folio(folio, swap);
} else {
void (*free_folio)(struct folio *);
_
Patches currently in -mm which might be from willy@infradead.org are
reply other threads:[~2022-10-03 21:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221003210450.CFC94C433D7@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.