@@ -32,16 +32,6 @@ static struct frontswap_ops *frontswap_ops __read_mostly;
32
32
#define for_each_frontswap_ops (ops ) \
33
33
for ((ops) = frontswap_ops; (ops); (ops) = (ops)->next)
34
34
35
- /*
36
- * If enabled, frontswap_store will return failure even on success. As
37
- * a result, the swap subsystem will always write the page to swap, in
38
- * effect converting frontswap into a writethrough cache. In this mode,
39
- * there is no direct reduction in swap writes, but a frontswap backend
40
- * can unilaterally "reclaim" any pages in use with no data loss, thus
41
- * providing increases control over maximum memory usage due to frontswap.
42
- */
43
- static bool frontswap_writethrough_enabled __read_mostly ;
44
-
45
35
/*
46
36
* If enabled, the underlying tmem implementation is capable of doing
47
37
* exclusive gets, so frontswap_load, on a successful tmem_get must
@@ -170,15 +160,6 @@ void frontswap_register_ops(struct frontswap_ops *ops)
170
160
}
171
161
EXPORT_SYMBOL (frontswap_register_ops );
172
162
173
- /*
174
- * Enable/disable frontswap writethrough (see above).
175
- */
176
- void frontswap_writethrough (bool enable )
177
- {
178
- frontswap_writethrough_enabled = enable ;
179
- }
180
- EXPORT_SYMBOL (frontswap_writethrough );
181
-
182
163
/*
183
164
* Enable/disable frontswap exclusive gets (see above).
184
165
*/
@@ -283,9 +264,7 @@ int __frontswap_store(struct page *page)
283
264
} else {
284
265
inc_frontswap_failed_stores ();
285
266
}
286
- if (frontswap_writethrough_enabled )
287
- /* report failure so swap also writes to swap device */
288
- ret = -1 ;
267
+
289
268
return ret ;
290
269
}
291
270
EXPORT_SYMBOL (__frontswap_store );
0 commit comments