hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/befs/linuxvfs.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/fs/befs/linuxvfs.c
34 *
....@@ -21,6 +22,7 @@
2122 #include <linux/cred.h>
2223 #include <linux/exportfs.h>
2324 #include <linux/seq_file.h>
25
+#include <linux/blkdev.h>
2426
2527 #include "befs.h"
2628 #include "btree.h"
....@@ -32,6 +34,7 @@
3234 MODULE_DESCRIPTION("BeOS File System (BeFS) driver");
3335 MODULE_AUTHOR("Will Dyson");
3436 MODULE_LICENSE("GPL");
37
+MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
3538
3639 /* The units the vfs expects inode->i_blocks to be in */
3740 #define VFS_BLOCK_SIZE 512
....@@ -44,7 +47,7 @@
4447 unsigned int);
4548 static struct inode *befs_iget(struct super_block *, unsigned long);
4649 static struct inode *befs_alloc_inode(struct super_block *sb);
47
-static void befs_destroy_inode(struct inode *inode);
50
+static void befs_free_inode(struct inode *inode);
4851 static void befs_destroy_inodecache(void);
4952 static int befs_symlink_readpage(struct file *, struct page *);
5053 static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
....@@ -64,7 +67,7 @@
6467
6568 static const struct super_operations befs_sops = {
6669 .alloc_inode = befs_alloc_inode, /* allocate a new inode */
67
- .destroy_inode = befs_destroy_inode, /* deallocate an inode */
70
+ .free_inode = befs_free_inode, /* deallocate an inode */
6871 .put_super = befs_put_super, /* uninit super */
6972 .statfs = befs_statfs, /* statfs */
7073 .remount_fs = befs_remount,
....@@ -281,15 +284,9 @@
281284 return &bi->vfs_inode;
282285 }
283286
284
-static void befs_i_callback(struct rcu_head *head)
287
+static void befs_free_inode(struct inode *inode)
285288 {
286
- struct inode *inode = container_of(head, struct inode, i_rcu);
287289 kmem_cache_free(befs_inode_cachep, BEFS_I(inode));
288
-}
289
-
290
-static void befs_destroy_inode(struct inode *inode)
291
-{
292
- call_rcu(&inode->i_rcu, befs_i_callback);
293290 }
294291
295292 static void init_once(void *foo)
....@@ -898,6 +895,8 @@
898895 sb_set_blocksize(sb, (ulong) befs_sb->block_size);
899896 sb->s_op = &befs_sops;
900897 sb->s_export_op = &befs_export_operations;
898
+ sb->s_time_min = 0;
899
+ sb->s_time_max = 0xffffffffffffll;
901900 root = befs_iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir)));
902901 if (IS_ERR(root)) {
903902 ret = PTR_ERR(root);
....@@ -965,8 +964,7 @@
965964 buf->f_bavail = buf->f_bfree;
966965 buf->f_files = 0; /* UNKNOWN */
967966 buf->f_ffree = 0; /* UNKNOWN */
968
- buf->f_fsid.val[0] = (u32)id;
969
- buf->f_fsid.val[1] = (u32)(id >> 32);
967
+ buf->f_fsid = u64_to_fsid(id);
970968 buf->f_namelen = BEFS_NAME_LEN;
971969
972970 befs_debug(sb, "<--- %s", __func__);