From: Kairui Song <ryncsn@gmail.com>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
David Hildenbrand <david@redhat.com>,
Hugh Dickins <hughd@google.com>, Chris Li <chrisl@kernel.org>,
Yosry Ahmed <yosryahmed@google.com>,
"Huang, Ying" <ying.huang@linux.alibaba.com>,
Nhat Pham <nphamcs@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-kernel@vger.kernel.org, Kairui Song <kasong@tencent.com>
Subject: [PATCH 6/6] mm, swap: remove no longer used swap mapping helper
Date: Mon, 28 Apr 2025 02:59:08 +0800 [thread overview]
Message-ID: <20250427185908.90450-7-ryncsn@gmail.com> (raw)
In-Reply-To: <20250427185908.90450-1-ryncsn@gmail.com>
From: Kairui Song <kasong@tencent.com>
This helper existed to fix the circular header dependency issue
but it is no longer used, so remove it.
Signed-off-by: Kairui Song <kasong@tencent.com>
---
include/linux/pagemap.h | 1 -
mm/swapfile.c | 9 ---------
2 files changed, 10 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index f61fdb8e165d..b27e369d8bd7 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -533,7 +533,6 @@ static inline void filemap_nr_thps_dec(struct address_space *mapping)
}
struct address_space *folio_mapping(struct folio *);
-struct address_space *swapcache_mapping(struct folio *);
/**
* folio_flush_mapping - Find the file mapping this folio belongs to.
diff --git a/mm/swapfile.c b/mm/swapfile.c
index bf6c98009909..1a36e1f4f198 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3653,15 +3653,6 @@ struct swap_info_struct *swp_swap_info(swp_entry_t entry)
return swap_type_to_swap_info(swp_type(entry));
}
-/*
- * out-of-line methods to avoid include hell.
- */
-struct address_space *swapcache_mapping(struct folio *folio)
-{
- return swp_swap_info(folio->swap)->swap_file->f_mapping;
-}
-EXPORT_SYMBOL_GPL(swapcache_mapping);
-
/*
* add_swap_count_continuation - called when a swap count is duplicated
* beyond SWAP_MAP_MAX, it allocates a new page and links that to the entry's
--
2.49.0
next prev parent reply other threads:[~2025-04-27 19:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-27 18:59 [PATCH 0/6] mm, swap: clean up swap cache " Kairui Song
2025-04-27 18:59 ` [PATCH 1/6] fuse: drop usage of folio_index Kairui Song
2025-04-28 0:37 ` Matthew Wilcox
2025-04-29 8:54 ` Kairui Song
2025-04-27 18:59 ` [PATCH 2/6] btrfs: " Kairui Song
2025-04-28 0:38 ` Matthew Wilcox
2025-04-28 0:54 ` Qu Wenruo
2025-04-28 2:14 ` Kairui Song
2025-04-27 18:59 ` [PATCH 3/6] f2fs: " Kairui Song
2025-04-28 0:41 ` Matthew Wilcox
2025-04-28 2:15 ` Kairui Song
2025-06-09 20:56 ` [f2fs-dev] " patchwork-bot+f2fs
2025-04-27 18:59 ` [PATCH 4/6] filemap: do not use folio_contains for swap cache folios Kairui Song
2025-04-28 0:44 ` Matthew Wilcox
2025-04-28 2:58 ` Kairui Song
2025-04-28 18:54 ` Kairui Song
2025-04-27 18:59 ` [PATCH 5/6] mm: move folio_index to mm/swap.h and remove no longer needed helper Kairui Song
2025-04-27 21:37 ` kernel test robot
2025-04-27 22:19 ` kernel test robot
2025-04-27 23:58 ` Matthew Wilcox
2025-04-28 3:14 ` Kairui Song
2025-04-27 18:59 ` Kairui Song [this message]
2025-04-28 0:31 ` [PATCH 6/6] mm, swap: remove no longer used swap mapping helper Matthew Wilcox
2025-04-27 19:02 ` [PATCH 0/6] mm, swap: clean up swap cache " Kairui Song
2025-04-28 0:34 ` Matthew Wilcox
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=20250427185908.90450-7-ryncsn@gmail.com \
--to=ryncsn@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chrisl@kernel.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=willy@infradead.org \
--cc=ying.huang@linux.alibaba.com \
--cc=yosryahmed@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox