.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * QNX6 file system, Linux implementation. |
---|
3 | 4 | * |
---|
.. | .. |
---|
29 | 30 | |
---|
30 | 31 | static void qnx6_put_super(struct super_block *sb); |
---|
31 | 32 | 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); |
---|
33 | 34 | static int qnx6_remount(struct super_block *sb, int *flags, char *data); |
---|
34 | 35 | static int qnx6_statfs(struct dentry *dentry, struct kstatfs *buf); |
---|
35 | 36 | static int qnx6_show_options(struct seq_file *seq, struct dentry *root); |
---|
36 | 37 | |
---|
37 | 38 | static const struct super_operations qnx6_sops = { |
---|
38 | 39 | .alloc_inode = qnx6_alloc_inode, |
---|
39 | | - .destroy_inode = qnx6_destroy_inode, |
---|
| 40 | + .free_inode = qnx6_free_inode, |
---|
40 | 41 | .put_super = qnx6_put_super, |
---|
41 | 42 | .statfs = qnx6_statfs, |
---|
42 | 43 | .remount_fs = qnx6_remount, |
---|
.. | .. |
---|
98 | 99 | return mpage_readpage(page, qnx6_get_block); |
---|
99 | 100 | } |
---|
100 | 101 | |
---|
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) |
---|
103 | 103 | { |
---|
104 | | - return mpage_readpages(mapping, pages, nr_pages, qnx6_get_block); |
---|
| 104 | + mpage_readahead(rac, qnx6_get_block); |
---|
105 | 105 | } |
---|
106 | 106 | |
---|
107 | 107 | /* |
---|
.. | .. |
---|
166 | 166 | buf->f_ffree = fs32_to_cpu(sbi, sbi->sb->sb_free_inodes); |
---|
167 | 167 | buf->f_bavail = buf->f_bfree; |
---|
168 | 168 | 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); |
---|
171 | 170 | |
---|
172 | 171 | return 0; |
---|
173 | 172 | } |
---|
.. | .. |
---|
428 | 427 | s->s_op = &qnx6_sops; |
---|
429 | 428 | s->s_magic = QNX6_SUPER_MAGIC; |
---|
430 | 429 | s->s_flags |= SB_RDONLY; /* Yup, read-only yet */ |
---|
| 430 | + s->s_time_min = 0; |
---|
| 431 | + s->s_time_max = U32_MAX; |
---|
431 | 432 | |
---|
432 | 433 | /* ease the later tree level calculations */ |
---|
433 | 434 | sbi = QNX6_SB(s); |
---|
.. | .. |
---|
496 | 497 | } |
---|
497 | 498 | static const struct address_space_operations qnx6_aops = { |
---|
498 | 499 | .readpage = qnx6_readpage, |
---|
499 | | - .readpages = qnx6_readpages, |
---|
| 500 | + .readahead = qnx6_readahead, |
---|
500 | 501 | .bmap = qnx6_bmap |
---|
501 | 502 | }; |
---|
502 | 503 | |
---|
.. | .. |
---|
602 | 603 | return &ei->vfs_inode; |
---|
603 | 604 | } |
---|
604 | 605 | |
---|
605 | | -static void qnx6_i_callback(struct rcu_head *head) |
---|
| 606 | +static void qnx6_free_inode(struct inode *inode) |
---|
606 | 607 | { |
---|
607 | | - struct inode *inode = container_of(head, struct inode, i_rcu); |
---|
608 | 608 | 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); |
---|
614 | 609 | } |
---|
615 | 610 | |
---|
616 | 611 | static void init_once(void *foo) |
---|
.. | .. |
---|
684 | 679 | module_init(init_qnx6_fs) |
---|
685 | 680 | module_exit(exit_qnx6_fs) |
---|
686 | 681 | MODULE_LICENSE("GPL"); |
---|
| 682 | +MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY); |
---|