Commit 71024cb4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

frontswap: remove frontswap_tmem_exclusive_gets

frontswap_tmem_exclusive_gets is never called, so remove it.

Link: https://lkml.kernel.org/r/20211224062246.1258487-4-hch@lst.deSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJuergen 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3d6035f1
...@@ -26,8 +26,6 @@ struct frontswap_ops { ...@@ -26,8 +26,6 @@ struct frontswap_ops {
extern void frontswap_register_ops(struct frontswap_ops *ops); extern void frontswap_register_ops(struct frontswap_ops *ops);
extern void frontswap_shrink(unsigned long); extern void frontswap_shrink(unsigned long);
extern unsigned long frontswap_curr_pages(void); extern unsigned long frontswap_curr_pages(void);
#define FRONTSWAP_HAS_EXCLUSIVE_GETS
extern void frontswap_tmem_exclusive_gets(bool);
extern bool __frontswap_test(struct swap_info_struct *, pgoff_t); extern bool __frontswap_test(struct swap_info_struct *, pgoff_t);
extern void __frontswap_init(unsigned type, unsigned long *map); extern void __frontswap_init(unsigned type, unsigned long *map);
......
...@@ -32,13 +32,6 @@ static struct frontswap_ops *frontswap_ops __read_mostly; ...@@ -32,13 +32,6 @@ static struct frontswap_ops *frontswap_ops __read_mostly;
#define for_each_frontswap_ops(ops) \ #define for_each_frontswap_ops(ops) \
for ((ops) = frontswap_ops; (ops); (ops) = (ops)->next) for ((ops) = frontswap_ops; (ops); (ops) = (ops)->next)
/*
* If enabled, the underlying tmem implementation is capable of doing
* exclusive gets, so frontswap_load, on a successful tmem_get must
* mark the page as no longer in frontswap AND mark it dirty.
*/
static bool frontswap_tmem_exclusive_gets_enabled __read_mostly;
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
/* /*
* Counters available via /sys/kernel/debug/frontswap (if debugfs is * Counters available via /sys/kernel/debug/frontswap (if debugfs is
...@@ -160,15 +153,6 @@ void frontswap_register_ops(struct frontswap_ops *ops) ...@@ -160,15 +153,6 @@ void frontswap_register_ops(struct frontswap_ops *ops)
} }
EXPORT_SYMBOL(frontswap_register_ops); EXPORT_SYMBOL(frontswap_register_ops);
/*
* Enable/disable frontswap exclusive gets (see above).
*/
void frontswap_tmem_exclusive_gets(bool enable)
{
frontswap_tmem_exclusive_gets_enabled = enable;
}
EXPORT_SYMBOL(frontswap_tmem_exclusive_gets);
/* /*
* Called when a swap device is swapon'd. * Called when a swap device is swapon'd.
*/ */
...@@ -296,13 +280,8 @@ int __frontswap_load(struct page *page) ...@@ -296,13 +280,8 @@ int __frontswap_load(struct page *page)
if (!ret) /* successful load */ if (!ret) /* successful load */
break; break;
} }
if (ret == 0) { if (ret == 0)
inc_frontswap_loads(); inc_frontswap_loads();
if (frontswap_tmem_exclusive_gets_enabled) {
SetPageDirty(page);
__frontswap_clear(sis, offset);
}
}
return ret; return ret;
} }
EXPORT_SYMBOL(__frontswap_load); EXPORT_SYMBOL(__frontswap_load);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment