hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/fs/ecryptfs/super.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /**
23 * eCryptfs: Linux filesystem encryption layer
34 *
....@@ -6,21 +7,6 @@
67 * Copyright (C) 2004-2006 International Business Machines Corp.
78 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com>
89 * Michael C. Thompson <mcthomps@us.ibm.com>
9
- *
10
- * This program is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public License as
12
- * published by the Free Software Foundation; either version 2 of the
13
- * License, or (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful, but
16
- * WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program; if not, write to the Free Software
22
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23
- * 02111-1307, USA.
2410 */
2511
2612 #include <linux/fs.h>
....@@ -67,9 +53,8 @@
6753 return inode;
6854 }
6955
70
-static void ecryptfs_i_callback(struct rcu_head *head)
56
+static void ecryptfs_free_inode(struct inode *inode)
7157 {
72
- struct inode *inode = container_of(head, struct inode, i_rcu);
7358 struct ecryptfs_inode_info *inode_info;
7459 inode_info = ecryptfs_inode_to_private(inode);
7560
....@@ -92,7 +77,6 @@
9277 inode_info = ecryptfs_inode_to_private(inode);
9378 BUG_ON(inode_info->lower_file);
9479 ecryptfs_destroy_crypt_stat(&inode_info->crypt_stat);
95
- call_rcu(&inode->i_rcu, ecryptfs_i_callback);
9680 }
9781
9882 /**
....@@ -186,6 +170,7 @@
186170 const struct super_operations ecryptfs_sops = {
187171 .alloc_inode = ecryptfs_alloc_inode,
188172 .destroy_inode = ecryptfs_destroy_inode,
173
+ .free_inode = ecryptfs_free_inode,
189174 .statfs = ecryptfs_statfs,
190175 .remount_fs = NULL,
191176 .evict_inode = ecryptfs_evict_inode,