hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/fs/qnx6/inode.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * QNX6 file system, Linux implementation.
34 *
....@@ -29,14 +30,14 @@
2930
3031 static void qnx6_put_super(struct super_block *sb);
3132 static struct inode *qnx6_alloc_inode(struct super_block *sb);
32
-static void qnx6_destroy_inode(struct inode *inode);
33
+static void qnx6_free_inode(struct inode *inode);
3334 static int qnx6_remount(struct super_block *sb, int *flags, char *data);
3435 static int qnx6_statfs(struct dentry *dentry, struct kstatfs *buf);
3536 static int qnx6_show_options(struct seq_file *seq, struct dentry *root);
3637
3738 static const struct super_operations qnx6_sops = {
3839 .alloc_inode = qnx6_alloc_inode,
39
- .destroy_inode = qnx6_destroy_inode,
40
+ .free_inode = qnx6_free_inode,
4041 .put_super = qnx6_put_super,
4142 .statfs = qnx6_statfs,
4243 .remount_fs = qnx6_remount,
....@@ -98,10 +99,9 @@
9899 return mpage_readpage(page, qnx6_get_block);
99100 }
100101
101
-static int qnx6_readpages(struct file *file, struct address_space *mapping,
102
- struct list_head *pages, unsigned nr_pages)
102
+static void qnx6_readahead(struct readahead_control *rac)
103103 {
104
- return mpage_readpages(mapping, pages, nr_pages, qnx6_get_block);
104
+ mpage_readahead(rac, qnx6_get_block);
105105 }
106106
107107 /*
....@@ -166,8 +166,7 @@
166166 buf->f_ffree = fs32_to_cpu(sbi, sbi->sb->sb_free_inodes);
167167 buf->f_bavail = buf->f_bfree;
168168 buf->f_namelen = QNX6_LONG_NAME_MAX;
169
- buf->f_fsid.val[0] = (u32)id;
170
- buf->f_fsid.val[1] = (u32)(id >> 32);
169
+ buf->f_fsid = u64_to_fsid(id);
171170
172171 return 0;
173172 }
....@@ -428,6 +427,8 @@
428427 s->s_op = &qnx6_sops;
429428 s->s_magic = QNX6_SUPER_MAGIC;
430429 s->s_flags |= SB_RDONLY; /* Yup, read-only yet */
430
+ s->s_time_min = 0;
431
+ s->s_time_max = U32_MAX;
431432
432433 /* ease the later tree level calculations */
433434 sbi = QNX6_SB(s);
....@@ -496,7 +497,7 @@
496497 }
497498 static const struct address_space_operations qnx6_aops = {
498499 .readpage = qnx6_readpage,
499
- .readpages = qnx6_readpages,
500
+ .readahead = qnx6_readahead,
500501 .bmap = qnx6_bmap
501502 };
502503
....@@ -602,15 +603,9 @@
602603 return &ei->vfs_inode;
603604 }
604605
605
-static void qnx6_i_callback(struct rcu_head *head)
606
+static void qnx6_free_inode(struct inode *inode)
606607 {
607
- struct inode *inode = container_of(head, struct inode, i_rcu);
608608 kmem_cache_free(qnx6_inode_cachep, QNX6_I(inode));
609
-}
610
-
611
-static void qnx6_destroy_inode(struct inode *inode)
612
-{
613
- call_rcu(&inode->i_rcu, qnx6_i_callback);
614609 }
615610
616611 static void init_once(void *foo)
....@@ -684,3 +679,4 @@
684679 module_init(init_qnx6_fs)
685680 module_exit(exit_qnx6_fs)
686681 MODULE_LICENSE("GPL");
682
+MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);