Skip to content

Commit 0d40cfe

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
fs: remove folio_file_mapping()
No callers of this function remain as filesystems no longer see swapfile pages through their normal read/write paths. Link: https://lkml.kernel.org/r/20250217192009.437916-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 52d671a commit 0d40cfe

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

include/linux/pagemap.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -535,26 +535,6 @@ static inline void filemap_nr_thps_dec(struct address_space *mapping)
535535
struct address_space *folio_mapping(struct folio *);
536536
struct address_space *swapcache_mapping(struct folio *);
537537

538-
/**
539-
* folio_file_mapping - Find the mapping this folio belongs to.
540-
* @folio: The folio.
541-
*
542-
* For folios which are in the page cache, return the mapping that this
543-
* page belongs to. Folios in the swap cache return the mapping of the
544-
* swap file or swap device where the data is stored. This is different
545-
* from the mapping returned by folio_mapping(). The only reason to
546-
* use it is if, like NFS, you return 0 from ->activate_swapfile.
547-
*
548-
* Do not call this for folios which aren't in the page cache or swap cache.
549-
*/
550-
static inline struct address_space *folio_file_mapping(struct folio *folio)
551-
{
552-
if (unlikely(folio_test_swapcache(folio)))
553-
return swapcache_mapping(folio);
554-
555-
return folio->mapping;
556-
}
557-
558538
/**
559539
* folio_flush_mapping - Find the file mapping this folio belongs to.
560540
* @folio: The folio.

0 commit comments

Comments
 (0)