hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/jfs/super.c
....@@ -1,20 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) International Business Machines Corp., 2000-2004
34 * Portions Copyright (C) Christoph Hellwig, 2001-2002
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13
- * the GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
185 */
196
207 #include <linux/fs.h>
....@@ -50,6 +37,7 @@
5037 MODULE_DESCRIPTION("The Journaled Filesystem (JFS)");
5138 MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM");
5239 MODULE_LICENSE("GPL");
40
+MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
5341
5442 static struct kmem_cache *jfs_inode_cachep;
5543
....@@ -124,27 +112,9 @@
124112 return &jfs_inode->vfs_inode;
125113 }
126114
127
-static void jfs_i_callback(struct rcu_head *head)
115
+static void jfs_free_inode(struct inode *inode)
128116 {
129
- struct inode *inode = container_of(head, struct inode, i_rcu);
130
- struct jfs_inode_info *ji = JFS_IP(inode);
131
- kmem_cache_free(jfs_inode_cachep, ji);
132
-}
133
-
134
-static void jfs_destroy_inode(struct inode *inode)
135
-{
136
- struct jfs_inode_info *ji = JFS_IP(inode);
137
-
138
- BUG_ON(!list_empty(&ji->anon_inode_list));
139
-
140
- spin_lock_irq(&ji->ag_lock);
141
- if (ji->active_ag != -1) {
142
- struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;
143
- atomic_dec(&bmap->db_active[ji->active_ag]);
144
- ji->active_ag = -1;
145
- }
146
- spin_unlock_irq(&ji->ag_lock);
147
- call_rcu(&inode->i_rcu, jfs_i_callback);
117
+ kmem_cache_free(jfs_inode_cachep, JFS_IP(inode));
148118 }
149119
150120 static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf)
....@@ -174,9 +144,11 @@
174144 buf->f_files = maxinodes;
175145 buf->f_ffree = maxinodes - (atomic_read(&imap->im_numinos) -
176146 atomic_read(&imap->im_numfree));
177
- buf->f_fsid.val[0] = (u32)crc32_le(0, sbi->uuid, sizeof(sbi->uuid)/2);
178
- buf->f_fsid.val[1] = (u32)crc32_le(0, sbi->uuid + sizeof(sbi->uuid)/2,
179
- sizeof(sbi->uuid)/2);
147
+ buf->f_fsid.val[0] = crc32_le(0, (char *)&sbi->uuid,
148
+ sizeof(sbi->uuid)/2);
149
+ buf->f_fsid.val[1] = crc32_le(0,
150
+ (char *)&sbi->uuid + sizeof(sbi->uuid)/2,
151
+ sizeof(sbi->uuid)/2);
180152
181153 buf->f_namelen = JFS_NAME_MAX;
182154 return 0;
....@@ -247,7 +219,7 @@
247219 {Opt_resize_nosize, "resize"},
248220 {Opt_errors, "errors=%s"},
249221 {Opt_ignore, "noquota"},
250
- {Opt_ignore, "quota"},
222
+ {Opt_quota, "quota"},
251223 {Opt_usrquota, "usrquota"},
252224 {Opt_grpquota, "grpquota"},
253225 {Opt_uid, "uid=%u"},
....@@ -532,6 +504,8 @@
532504
533505 sb->s_fs_info = sbi;
534506 sb->s_max_links = JFS_LINK_MAX;
507
+ sb->s_time_min = 0;
508
+ sb->s_time_max = U32_MAX;
535509 sbi->sb = sb;
536510 sbi->uid = INVALID_UID;
537511 sbi->gid = INVALID_GID;
....@@ -912,7 +886,7 @@
912886
913887 static const struct super_operations jfs_super_operations = {
914888 .alloc_inode = jfs_alloc_inode,
915
- .destroy_inode = jfs_destroy_inode,
889
+ .free_inode = jfs_free_inode,
916890 .dirty_inode = jfs_dirty_inode,
917891 .write_inode = jfs_write_inode,
918892 .evict_inode = jfs_evict_inode,