Blame SOURCES/9001-Compat-for-missing-inode-method-free_inode.patch

Kmods SIG 50e2b3
From 8c3318adf46a7f2d3026ea08f66e8483a4971ca4 Mon Sep 17 00:00:00 2001
Kmods SIG 50e2b3
From: Peter Georg <peter.georg@physik.uni-regensburg.de>
Kmods SIG 50e2b3
Date: Mon, 23 Aug 2021 14:27:25 +0200
Kmods SIG 50e2b3
Subject: [PATCH] Compat for missing inode method ->free_inode()
Kmods SIG 50e2b3
Kmods SIG 50e2b3
Introduced upstream in fdb0da89f4ba0c74d7d3b9e6f471e96a5766820b
Kmods SIG 50e2b3
---
Kmods SIG 50e2b3
 src/super.c | 10 ++++++++--
Kmods SIG 50e2b3
 1 file changed, 8 insertions(+), 2 deletions(-)
Kmods SIG 50e2b3
Kmods SIG 50e2b3
diff --git a/src/super.c b/src/super.c
Kmods SIG 50e2b3
index a3d3b39..af81722 100644
Kmods SIG 50e2b3
--- a/src/super.c
Kmods SIG 50e2b3
+++ b/src/super.c
Kmods SIG 50e2b3
@@ -191,14 +191,20 @@ static struct inode *exfat_alloc_inode(struct super_block *sb)
Kmods SIG 50e2b3
 	return &ei->vfs_inode;
Kmods SIG 50e2b3
 }
Kmods SIG 50e2b3
 
Kmods SIG 50e2b3
-static void exfat_free_inode(struct inode *inode)
Kmods SIG 50e2b3
+static void exfat_i_callback(struct rcu_head *head)
Kmods SIG 50e2b3
 {
Kmods SIG 50e2b3
+	struct inode *inode = container_of(head, struct inode, i_rcu);
Kmods SIG 50e2b3
 	kmem_cache_free(exfat_inode_cachep, EXFAT_I(inode));
Kmods SIG 50e2b3
 }
Kmods SIG 50e2b3
 
Kmods SIG 50e2b3
+static void exfat_destroy_inode(struct inode *inode)
Kmods SIG 50e2b3
+{
Kmods SIG 50e2b3
+	call_rcu(&inode->i_rcu, exfat_i_callback);
Kmods SIG 50e2b3
+}
Kmods SIG 50e2b3
+
Kmods SIG 50e2b3
 static const struct super_operations exfat_sops = {
Kmods SIG 50e2b3
 	.alloc_inode	= exfat_alloc_inode,
Kmods SIG 50e2b3
-	.free_inode	= exfat_free_inode,
Kmods SIG 50e2b3
+	.destroy_inode	= exfat_destroy_inode,
Kmods SIG 50e2b3
 	.write_inode	= exfat_write_inode,
Kmods SIG 50e2b3
 	.evict_inode	= exfat_evict_inode,
Kmods SIG 50e2b3
 	.put_super	= exfat_put_super,
Kmods SIG 50e2b3
-- 
Kmods SIG 50e2b3
2.31.1
Kmods SIG 50e2b3