| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/fs/befs/linuxvfs.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 21 | 22 | #include <linux/cred.h> |
|---|
| 22 | 23 | #include <linux/exportfs.h> |
|---|
| 23 | 24 | #include <linux/seq_file.h> |
|---|
| 25 | +#include <linux/blkdev.h> |
|---|
| 24 | 26 | |
|---|
| 25 | 27 | #include "befs.h" |
|---|
| 26 | 28 | #include "btree.h" |
|---|
| .. | .. |
|---|
| 32 | 34 | MODULE_DESCRIPTION("BeOS File System (BeFS) driver"); |
|---|
| 33 | 35 | MODULE_AUTHOR("Will Dyson"); |
|---|
| 34 | 36 | MODULE_LICENSE("GPL"); |
|---|
| 37 | +MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY); |
|---|
| 35 | 38 | |
|---|
| 36 | 39 | /* The units the vfs expects inode->i_blocks to be in */ |
|---|
| 37 | 40 | #define VFS_BLOCK_SIZE 512 |
|---|
| .. | .. |
|---|
| 44 | 47 | unsigned int); |
|---|
| 45 | 48 | static struct inode *befs_iget(struct super_block *, unsigned long); |
|---|
| 46 | 49 | 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); |
|---|
| 48 | 51 | static void befs_destroy_inodecache(void); |
|---|
| 49 | 52 | static int befs_symlink_readpage(struct file *, struct page *); |
|---|
| 50 | 53 | static int befs_utf2nls(struct super_block *sb, const char *in, int in_len, |
|---|
| .. | .. |
|---|
| 64 | 67 | |
|---|
| 65 | 68 | static const struct super_operations befs_sops = { |
|---|
| 66 | 69 | .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 */ |
|---|
| 68 | 71 | .put_super = befs_put_super, /* uninit super */ |
|---|
| 69 | 72 | .statfs = befs_statfs, /* statfs */ |
|---|
| 70 | 73 | .remount_fs = befs_remount, |
|---|
| .. | .. |
|---|
| 281 | 284 | return &bi->vfs_inode; |
|---|
| 282 | 285 | } |
|---|
| 283 | 286 | |
|---|
| 284 | | -static void befs_i_callback(struct rcu_head *head) |
|---|
| 287 | +static void befs_free_inode(struct inode *inode) |
|---|
| 285 | 288 | { |
|---|
| 286 | | - struct inode *inode = container_of(head, struct inode, i_rcu); |
|---|
| 287 | 289 | 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); |
|---|
| 293 | 290 | } |
|---|
| 294 | 291 | |
|---|
| 295 | 292 | static void init_once(void *foo) |
|---|
| .. | .. |
|---|
| 898 | 895 | sb_set_blocksize(sb, (ulong) befs_sb->block_size); |
|---|
| 899 | 896 | sb->s_op = &befs_sops; |
|---|
| 900 | 897 | sb->s_export_op = &befs_export_operations; |
|---|
| 898 | + sb->s_time_min = 0; |
|---|
| 899 | + sb->s_time_max = 0xffffffffffffll; |
|---|
| 901 | 900 | root = befs_iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir))); |
|---|
| 902 | 901 | if (IS_ERR(root)) { |
|---|
| 903 | 902 | ret = PTR_ERR(root); |
|---|
| .. | .. |
|---|
| 965 | 964 | buf->f_bavail = buf->f_bfree; |
|---|
| 966 | 965 | buf->f_files = 0; /* UNKNOWN */ |
|---|
| 967 | 966 | 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); |
|---|
| 970 | 968 | buf->f_namelen = BEFS_NAME_LEN; |
|---|
| 971 | 969 | |
|---|
| 972 | 970 | befs_debug(sb, "<--- %s", __func__); |
|---|