diff options
author | Christoph Hellwig <hch@lst.de> | 2022-01-22 07:14:38 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-22 07:33:38 +0100 |
commit | 3d6035f136009f9cae380022754cba31f32570c5 (patch) | |
tree | 27abeef2c531adcc66d3030294f9ff4c3bef2351 /mm/frontswap.c | |
parent | mm: remove cleancache (diff) | |
download | linux-3d6035f136009f9cae380022754cba31f32570c5.tar.xz linux-3d6035f136009f9cae380022754cba31f32570c5.zip |
frontswap: remove frontswap_writethrough
frontswap_writethrough is never called, so remove it.
Link: https://lkml.kernel.org/r/20211224062246.1258487-3-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.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/mm/frontswap.c b/mm/frontswap.c index 6bed12260dea..51a662a83955 100644 --- a/mm/frontswap.c +++ b/mm/frontswap.c @@ -33,16 +33,6 @@ static struct frontswap_ops *frontswap_ops __read_mostly; for ((ops) = frontswap_ops; (ops); (ops) = (ops)->next) /* - * If enabled, frontswap_store will return failure even on success. As - * a result, the swap subsystem will always write the page to swap, in - * effect converting frontswap into a writethrough cache. In this mode, - * there is no direct reduction in swap writes, but a frontswap backend - * can unilaterally "reclaim" any pages in use with no data loss, thus - * providing increases control over maximum memory usage due to frontswap. - */ -static bool frontswap_writethrough_enabled __read_mostly; - -/* * 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. @@ -171,15 +161,6 @@ void frontswap_register_ops(struct frontswap_ops *ops) EXPORT_SYMBOL(frontswap_register_ops); /* - * Enable/disable frontswap writethrough (see above). - */ -void frontswap_writethrough(bool enable) -{ - frontswap_writethrough_enabled = enable; -} -EXPORT_SYMBOL(frontswap_writethrough); - -/* * Enable/disable frontswap exclusive gets (see above). */ void frontswap_tmem_exclusive_gets(bool enable) @@ -283,9 +264,7 @@ int __frontswap_store(struct page *page) } else { inc_frontswap_failed_stores(); } - if (frontswap_writethrough_enabled) - /* report failure so swap also writes to swap device */ - ret = -1; + return ret; } EXPORT_SYMBOL(__frontswap_store); |