Skip to contentSkip to conversation

frontswap-remove-support-for-multiple-ops.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 23, 2022

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: frontswap: remove support for multiple ops
has been removed from the -mm tree. Its filename was
frontswap-remove-support-for-multiple-ops.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Christoph Hellwig <[email protected]>
Subject: frontswap: remove support for multiple ops

There is only a single instance of frontswap ops in the kernel, so simplify the frontswap code by removing support for multiple operations.

Cc Dan Streetman <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Seth Jennings <[email protected]>
Cc Vitaly Wool <[email protected]>

---

 include/linux/frontswap.h |    3 --
 mm/frontswap.c            |   50 ++++++++----------------------------
 mm/zswap.c                |    8 ++++-
 3 files changed, 19 insertions(+), 42 deletions(-)
include/linux/frontswap.h renamed from include/linux/frontswap.h~frontswap-remove-support-for-multiple-ops +1 -2
@@ -13,10 +13,9 @@ struct frontswap_ops {
 	int (*load)(unsigned, pgoff_t, struct page *); /* load a page */
 	void (*invalidate_page)(unsigned, pgoff_t); /* page no longer needed */
 	void (*invalidate_area)(unsigned); /* swap type just swapoff'ed */
-	struct frontswap_ops *next; /* private pointer to next ops */
 };
 
-extern void frontswap_register_ops(struct frontswap_ops *ops);
+int frontswap_register_ops(const struct frontswap_ops *ops);
 
 extern void frontswap_init(unsigned type, unsigned long *map);
 extern int __frontswap_store(struct page *page);
mm/frontswap.c renamed from mm/frontswap.c~frontswap-remove-support-for-multiple-ops +12 -38

127 lines not on this page · raw message

mm/zswap.c renamed from mm/zswap.c~frontswap-remove-support-for-multiple-ops +6 -2
@@ -1378,7 +1378,7 @@ static void zswap_frontswap_init(unsigne
 	zswap_trees[type] = tree;
 }
 
-static struct frontswap_ops zswap_frontswap_ops = {
+static const struct frontswap_ops zswap_frontswap_ops = {
 	.store = zswap_frontswap_store,
 	.load = zswap_frontswap_load,
 	.invalidate_page = zswap_frontswap_invalidate_page,
@@ -1475,11 +1475,15 @@ static int __init init_zswap(void)
 	if (!shrink_wq)
 		goto fallback_fail;
 
-	frontswap_register_ops(&zswap_frontswap_ops);
+	ret = frontswap_register_ops(&zswap_frontswap_ops);
+	if (ret)
+		goto destroy_wq;
 	if (zswap_debugfs_init())
 		pr_warn("debugfs initialization failed\n");
 	return 0;
 
+destroy_wq:
+	destroy_workqueue(shrink_wq);
 fallback_fail:
 	if (pool)
 		zswap_pool_destroy(pool);

_

Patches currently in -mm which might be from [email protected] are