Blob Blame History Raw
From 8c3318adf46a7f2d3026ea08f66e8483a4971ca4 Mon Sep 17 00:00:00 2001
From: Peter Georg <peter.georg@physik.uni-regensburg.de>
Date: Mon, 23 Aug 2021 14:27:25 +0200
Subject: [PATCH] Compat for missing inode method ->free_inode()

Introduced upstream in fdb0da89f4ba0c74d7d3b9e6f471e96a5766820b
---
 src/super.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/super.c b/src/super.c
index a3d3b39..af81722 100644
--- a/src/super.c
+++ b/src/super.c
@@ -191,14 +191,20 @@ static struct inode *exfat_alloc_inode(struct super_block *sb)
 	return &ei->vfs_inode;
 }
 
-static void exfat_free_inode(struct inode *inode)
+static void exfat_i_callback(struct rcu_head *head)
 {
+	struct inode *inode = container_of(head, struct inode, i_rcu);
 	kmem_cache_free(exfat_inode_cachep, EXFAT_I(inode));
 }
 
+static void exfat_destroy_inode(struct inode *inode)
+{
+	call_rcu(&inode->i_rcu, exfat_i_callback);
+}
+
 static const struct super_operations exfat_sops = {
 	.alloc_inode	= exfat_alloc_inode,
-	.free_inode	= exfat_free_inode,
+	.destroy_inode	= exfat_destroy_inode,
 	.write_inode	= exfat_write_inode,
 	.evict_inode	= exfat_evict_inode,
 	.put_super	= exfat_put_super,
-- 
2.31.1