Skip to content

Commit bd9cd52

Browse files
Christoph Hellwigtorvalds
authored andcommitted
frontswap: remove frontswap_test
frontswap_test is unused now, remove it. Link: https://lkml.kernel.org/r/20211224062246.1258487-10-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Juergen Gross <jgross@suse.com> Cc: Dan Streetman <ddstreet@ieee.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Hugh Dickins <hughd@google.com> Cc: Konrad Rzeszutek Wilk <Konrad.wilk@oracle.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Seth Jennings <sjenning@redhat.com> Cc: Vitaly Wool <vitaly.wool@konsulko.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 10a9c49 commit bd9cd52

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

include/linux/frontswap.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ struct frontswap_ops {
1818

1919
extern void frontswap_register_ops(struct frontswap_ops *ops);
2020

21-
extern bool __frontswap_test(struct swap_info_struct *, pgoff_t);
2221
extern void frontswap_init(unsigned type, unsigned long *map);
2322
extern int __frontswap_store(struct page *page);
2423
extern int __frontswap_load(struct page *page);
@@ -33,11 +32,6 @@ static inline bool frontswap_enabled(void)
3332
return static_branch_unlikely(&frontswap_enabled_key);
3433
}
3534

36-
static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset)
37-
{
38-
return __frontswap_test(sis, offset);
39-
}
40-
4135
static inline void frontswap_map_set(struct swap_info_struct *p,
4236
unsigned long *map)
4337
{
@@ -56,11 +50,6 @@ static inline bool frontswap_enabled(void)
5650
return false;
5751
}
5852

59-
static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset)
60-
{
61-
return false;
62-
}
63-
6453
static inline void frontswap_map_set(struct swap_info_struct *p,
6554
unsigned long *map)
6655
{

mm/frontswap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ void frontswap_init(unsigned type, unsigned long *map)
179179
ops->init(type);
180180
}
181181

182-
bool __frontswap_test(struct swap_info_struct *sis,
182+
static bool __frontswap_test(struct swap_info_struct *sis,
183183
pgoff_t offset)
184184
{
185185
if (sis->frontswap_map)

0 commit comments

Comments
 (0)