#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched/signal.h>
#include <linux/time.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/stat.h>
#include <linux/errno.h>
#include <linux/unistd.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/metrics.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/nfs4_mount.h>
#include <linux/lockd/bind.h>
#include <linux/seq_file.h>
#include <linux/mount.h>
#include <linux/vfs.h>
#include <linux/inet.h>
#include <linux/nfs_xdr.h>
#include <linux/slab.h>
#include <linux/compat.h>
#include <linux/freezer.h>
#include <linux/uaccess.h>
#include <linux/iversion.h>
#include "nfs4_fs.h"
#include "callback.h"
#include "delegation.h"
#include "iostat.h"
#include "internal.h"
#include "fscache.h"
#include "pnfs.h"
#include "nfs.h"
#include "netns.h"
#include "sysfs.h"
#include "nfstrace.h"
#define NFSDBG_FACILITY …
#define NFS_64_BIT_INODE_NUMBERS_ENABLED …
static bool enable_ino64 = …;
static int nfs_update_inode(struct inode *, struct nfs_fattr *);
static struct kmem_cache * nfs_inode_cachep;
static inline unsigned long
nfs_fattr_to_ino_t(struct nfs_fattr *fattr)
{ … }
int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
{ … }
EXPORT_SYMBOL_GPL(…);
u64 nfs_compat_user_ino64(u64 fileid)
{ … }
int nfs_drop_inode(struct inode *inode)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_clear_inode(struct inode *inode)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_evict_inode(struct inode *inode)
{ … }
int nfs_sync_inode(struct inode *inode)
{ … }
EXPORT_SYMBOL_GPL(…);
int nfs_sync_mapping(struct address_space *mapping)
{ … }
static int nfs_attribute_timeout(struct inode *inode)
{ … }
static bool nfs_check_cache_flags_invalid(struct inode *inode,
unsigned long flags)
{ … }
bool nfs_check_cache_invalid(struct inode *inode, unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_NFS_V4_2
static bool nfs_has_xattr_cache(const struct nfs_inode *nfsi)
{ … }
#else
static bool nfs_has_xattr_cache(const struct nfs_inode *nfsi)
{
return false;
}
#endif
void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
static void nfs_zap_caches_locked(struct inode *inode)
{ … }
void nfs_zap_caches(struct inode *inode)
{ … }
void nfs_zap_mapping(struct inode *inode, struct address_space *mapping)
{ … }
void nfs_zap_acl_cache(struct inode *inode)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_invalidate_atime(struct inode *inode)
{ … }
EXPORT_SYMBOL_GPL(…);
static void nfs_set_inode_stale_locked(struct inode *inode)
{ … }
void nfs_set_inode_stale(struct inode *inode)
{ … }
struct nfs_find_desc { … };
static int
nfs_find_actor(struct inode *inode, void *opaque)
{ … }
static int
nfs_init_locked(struct inode *inode, void *opaque)
{ … }
#ifdef CONFIG_NFS_V4_SECURITY_LABEL
static void nfs_clear_label_invalid(struct inode *inode)
{ … }
void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr)
{ … }
struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags)
{ … }
EXPORT_SYMBOL_GPL(…);
#else
void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr)
{
}
#endif
EXPORT_SYMBOL_GPL(…);
struct inode *
nfs_ilookup(struct super_block *sb, struct nfs_fattr *fattr, struct nfs_fh *fh)
{ … }
static void nfs_inode_init_regular(struct nfs_inode *nfsi)
{ … }
static void nfs_inode_init_dir(struct nfs_inode *nfsi)
{ … }
struct inode *
nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
{ … }
EXPORT_SYMBOL_GPL(…);
static void
nfs_fattr_fixup_delegated(struct inode *inode, struct nfs_fattr *fattr)
{ … }
void nfs_update_delegated_atime(struct inode *inode)
{ … }
void nfs_update_delegated_mtime_locked(struct inode *inode)
{ … }
void nfs_update_delegated_mtime(struct inode *inode)
{ … }
EXPORT_SYMBOL_GPL(…);
#define NFS_VALID_ATTRS …
int
nfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct iattr *attr)
{ … }
EXPORT_SYMBOL_GPL(…);
static int nfs_vmtruncate(struct inode * inode, loff_t offset)
{ … }
void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr,
struct nfs_fattr *fattr)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool nfs_getattr_readdirplus_enable(const struct inode *inode)
{ … }
static void nfs_readdirplus_parent_cache_miss(struct dentry *dentry)
{ … }
static void nfs_readdirplus_parent_cache_hit(struct dentry *dentry)
{ … }
static u32 nfs_get_valid_attrmask(struct inode *inode)
{ … }
int nfs_getattr(struct mnt_idmap *idmap, const struct path *path,
struct kstat *stat, u32 request_mask, unsigned int query_flags)
{ … }
EXPORT_SYMBOL_GPL(…);
static void nfs_init_lock_context(struct nfs_lock_context *l_ctx)
{ … }
static struct nfs_lock_context *__nfs_find_lock_context(struct nfs_open_context *ctx)
{ … }
struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_put_lock_context(struct nfs_lock_context *l_ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_close_context(struct nfs_open_context *ctx, int is_sync)
{ … }
EXPORT_SYMBOL_GPL(…);
struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry,
fmode_t f_mode,
struct file *filp)
{ … }
EXPORT_SYMBOL_GPL(…);
struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync)
{ … }
void put_nfs_open_context(struct nfs_open_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
static void put_nfs_open_context_sync(struct nfs_open_context *ctx)
{ … }
void nfs_inode_attach_open_context(struct nfs_open_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
struct nfs_open_context *nfs_find_open_context(struct inode *inode, const struct cred *cred, fmode_t mode)
{ … }
void nfs_file_clear_open_context(struct file *filp)
{ … }
int nfs_open(struct inode *inode, struct file *filp)
{ … }
int
__nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
{ … }
int nfs_attribute_cache_expired(struct inode *inode)
{ … }
int nfs_revalidate_inode(struct inode *inode, unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
static int nfs_invalidate_mapping(struct inode *inode, struct address_space *mapping)
{ … }
int nfs_clear_invalid_mapping(struct address_space *mapping)
{ … }
bool nfs_mapping_need_revalidate_inode(struct inode *inode)
{ … }
int nfs_revalidate_mapping_rcu(struct inode *inode)
{ … }
int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
{ … }
static bool nfs_file_has_writers(struct nfs_inode *nfsi)
{ … }
static bool nfs_file_has_buffered_writers(struct nfs_inode *nfsi)
{ … }
static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr)
{ … }
static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fattr)
{ … }
static atomic_long_t nfs_attr_generation_counter;
static unsigned long nfs_read_attr_generation_counter(void)
{ … }
unsigned long nfs_inc_attr_generation_counter(void)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_fattr_init(struct nfs_fattr *fattr)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_fattr_set_barrier(struct nfs_fattr *fattr)
{ … }
struct nfs_fattr *nfs_alloc_fattr(void)
{ … }
EXPORT_SYMBOL_GPL(…);
struct nfs_fattr *nfs_alloc_fattr_with_label(struct nfs_server *server)
{ … }
EXPORT_SYMBOL_GPL(…);
struct nfs_fh *nfs_alloc_fhandle(void)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef NFS_DEBUG
u32 _nfs_display_fhandle_hash(const struct nfs_fh *fh)
{ … }
EXPORT_SYMBOL_GPL(…);
void _nfs_display_fhandle(const struct nfs_fh *fh, const char *caption)
{ … }
EXPORT_SYMBOL_GPL(…);
#endif
static int nfs_inode_attrs_cmp_generic(const struct nfs_fattr *fattr,
const struct inode *inode)
{ … }
static int nfs_inode_attrs_cmp_monotonic(const struct nfs_fattr *fattr,
const struct inode *inode)
{ … }
static int nfs_inode_attrs_cmp_strict_monotonic(const struct nfs_fattr *fattr,
const struct inode *inode)
{ … }
static int nfs_inode_attrs_cmp(const struct nfs_fattr *fattr,
const struct inode *inode)
{ … }
static int nfs_inode_finish_partial_attr_update(const struct nfs_fattr *fattr,
const struct inode *inode)
{ … }
static void nfs_ooo_merge(struct nfs_inode *nfsi,
u64 start, u64 end)
{ … }
static void nfs_ooo_record(struct nfs_inode *nfsi,
struct nfs_fattr *fattr)
{ … }
static int nfs_refresh_inode_locked(struct inode *inode,
struct nfs_fattr *fattr)
{ … }
int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
{ … }
EXPORT_SYMBOL_GPL(…);
static int nfs_post_op_update_inode_locked(struct inode *inode,
struct nfs_fattr *fattr, unsigned int invalid)
{ … }
int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
{ … }
EXPORT_SYMBOL_GPL(…);
int nfs_post_op_update_inode_force_wcc_locked(struct inode *inode, struct nfs_fattr *fattr)
{ … }
int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr)
{ … }
EXPORT_SYMBOL_GPL(…);
static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
{ … }
struct inode *nfs_alloc_inode(struct super_block *sb)
{ … }
EXPORT_SYMBOL_GPL(…);
void nfs_free_inode(struct inode *inode)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline void nfs4_init_once(struct nfs_inode *nfsi)
{ … }
static void init_once(void *foo)
{ … }
static int __init nfs_init_inodecache(void)
{ … }
static void nfs_destroy_inodecache(void)
{ … }
struct workqueue_struct *nfsiod_workqueue;
EXPORT_SYMBOL_GPL(…);
static int nfsiod_start(void)
{ … }
static void nfsiod_stop(void)
{ … }
unsigned int nfs_net_id;
EXPORT_SYMBOL_GPL(…);
static int nfs_net_init(struct net *net)
{ … }
static void nfs_net_exit(struct net *net)
{ … }
static struct pernet_operations nfs_net_ops = …;
static int __init init_nfs_fs(void)
{ … }
static void __exit exit_nfs_fs(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
module_param(enable_ino64, bool, 0644);
module_init(…) …
module_exit(…)