#include <linux/types.h>
#include <linux/param.h>
#include <linux/time.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/in.h>
#include <linux/pagemap.h>
#include <linux/sunrpc/clnt.h>
#include <linux/nfs.h>
#include <linux/nfs2.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_page.h>
#include <linux/lockd/bind.h>
#include <linux/freezer.h>
#include "internal.h"
#define NFSDBG_FACILITY …
static int
nfs_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{ … }
static int
nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fattr *fattr, struct inode *inode)
{ … }
static int
nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
struct iattr *sattr)
{ … }
static int
nfs_proc_lookup(struct inode *dir, struct dentry *dentry,
struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ … }
static int nfs_proc_readlink(struct inode *inode, struct page *page,
unsigned int pgbase, unsigned int pglen)
{ … }
struct nfs_createdata { … };
static struct nfs_createdata *nfs_alloc_createdata(struct inode *dir,
struct dentry *dentry, struct iattr *sattr)
{
struct nfs_createdata *data;
data = kmalloc(sizeof(*data), GFP_KERNEL);
if (data != NULL) {
data->arg.fh = NFS_FH(dir);
data->arg.name = dentry->d_name.name;
data->arg.len = dentry->d_name.len;
data->arg.sattr = sattr;
nfs_fattr_init(&data->fattr);
data->fhandle.size = 0;
data->res.fh = &data->fhandle;
data->res.fattr = &data->fattr;
}
return data;
};
static void nfs_free_createdata(const struct nfs_createdata *data)
{ … }
static int
nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
int flags)
{ … }
static int
nfs_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
dev_t rdev)
{ … }
static int
nfs_proc_remove(struct inode *dir, struct dentry *dentry)
{ … }
static void
nfs_proc_unlink_setup(struct rpc_message *msg,
struct dentry *dentry,
struct inode *inode)
{ … }
static void nfs_proc_unlink_rpc_prepare(struct rpc_task *task, struct nfs_unlinkdata *data)
{ … }
static int nfs_proc_unlink_done(struct rpc_task *task, struct inode *dir)
{ … }
static void
nfs_proc_rename_setup(struct rpc_message *msg,
struct dentry *old_dentry,
struct dentry *new_dentry)
{ … }
static void nfs_proc_rename_rpc_prepare(struct rpc_task *task, struct nfs_renamedata *data)
{ … }
static int
nfs_proc_rename_done(struct rpc_task *task, struct inode *old_dir,
struct inode *new_dir)
{ … }
static int
nfs_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name)
{ … }
static int
nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct folio *folio,
unsigned int len, struct iattr *sattr)
{ … }
static int
nfs_proc_mkdir(struct inode *dir, struct dentry *dentry, struct iattr *sattr)
{ … }
static int
nfs_proc_rmdir(struct inode *dir, const struct qstr *name)
{ … }
static int nfs_proc_readdir(struct nfs_readdir_arg *nr_arg,
struct nfs_readdir_res *nr_res)
{ … }
static int
nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsstat *stat)
{ … }
static int
nfs_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{ … }
static int
nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_pathconf *info)
{ … }
static int nfs_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
{ … }
static void nfs_proc_read_setup(struct nfs_pgio_header *hdr,
struct rpc_message *msg)
{ … }
static int nfs_proc_pgio_rpc_prepare(struct rpc_task *task,
struct nfs_pgio_header *hdr)
{ … }
static int nfs_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
{ … }
static void nfs_proc_write_setup(struct nfs_pgio_header *hdr,
struct rpc_message *msg,
struct rpc_clnt **clnt)
{ … }
static void nfs_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commit_data *data)
{ … }
static void
nfs_proc_commit_setup(struct nfs_commit_data *data, struct rpc_message *msg,
struct rpc_clnt **clnt)
{ … }
static int
nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl)
{ … }
#define NFS_LOCK32_OFFSET_MAX …
static int nfs_lock_check_bounds(const struct file_lock *fl)
{ … }
static int nfs_have_delegation(struct inode *inode, fmode_t type, int flags)
{ … }
static int nfs_return_delegation(struct inode *inode)
{ … }
static const struct inode_operations nfs_dir_inode_operations = …;
static const struct inode_operations nfs_file_inode_operations = …;
const struct nfs_rpc_ops nfs_v2_clientops = …;