summaryrefslogtreecommitdiff
path: root/mm/frontswap.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-01-22 09:14:41 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-22 09:33:38 +0300
commit71024cb4a0bfe7767aec7a128d0a1a13a37b7fcd (patch)
tree720c670c808b6510c43834a475ee2a3ea942d3b3 /mm/frontswap.c
parent3d6035f136009f9cae380022754cba31f32570c5 (diff)
downloadlinux-71024cb4a0bfe7767aec7a128d0a1a13a37b7fcd.tar.xz
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.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>
Diffstat (limited to 'mm/frontswap.c')
-rw-r--r--mm/frontswap.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/mm/frontswap.c b/mm/frontswap.c
index 51a662a83955..dba7f087ee86 100644
--- a/mm/frontswap.c
+++ b/mm/frontswap.c
@@ -32,13 +32,6 @@ static struct frontswap_ops *frontswap_ops __read_mostly;
#define for_each_frontswap_ops(ops) \
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
/*
* Counters available via /sys/kernel/debug/frontswap (if debugfs is
@@ -161,15 +154,6 @@ void frontswap_register_ops(struct frontswap_ops *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.
*/
void __frontswap_init(unsigned type, unsigned long *map)
@@ -296,13 +280,8 @@ int __frontswap_load(struct page *page)
if (!ret) /* successful load */
break;
}
- if (ret == 0) {
+ if (ret == 0)
inc_frontswap_loads();
- if (frontswap_tmem_exclusive_gets_enabled) {
- SetPageDirty(page);
- __frontswap_clear(sis, offset);
- }
- }
return ret;
}
EXPORT_SYMBOL(__frontswap_load);