Skip to content

Commit

Permalink
frontswap: remove frontswap_test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Jan 22, 2022
1 parent 10a9c49 commit bd9cd52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions include/linux/frontswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ struct frontswap_ops {

extern void frontswap_register_ops(struct frontswap_ops *ops);

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

static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset)
{
return __frontswap_test(sis, offset);
}

static inline void frontswap_map_set(struct swap_info_struct *p,
unsigned long *map)
{
Expand All @@ -56,11 +50,6 @@ static inline bool frontswap_enabled(void)
return false;
}

static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset)
{
return false;
}

static inline void frontswap_map_set(struct swap_info_struct *p,
unsigned long *map)
{
Expand Down
2 changes: 1 addition & 1 deletion mm/frontswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void frontswap_init(unsigned type, unsigned long *map)
ops->init(type);
}

bool __frontswap_test(struct swap_info_struct *sis,
static bool __frontswap_test(struct swap_info_struct *sis,
pgoff_t offset)
{
if (sis->frontswap_map)
Expand Down

0 comments on commit bd9cd52

Please sign in to comment.