#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/ratelimit.h>
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/sunrpc/clnt.h>
#include <linux/nfs.h>
#include <linux/nfs4.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_page.h>
#include <linux/nfs_mount.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/module.h>
#include <linux/xattr.h>
#include <linux/utsname.h>
#include <linux/freezer.h>
#include <linux/iversion.h>
#include "nfs4_fs.h"
#include "delegation.h"
#include "internal.h"
#include "iostat.h"
#include "callback.h"
#include "pnfs.h"
#include "netns.h"
#include "sysfs.h"
#include "nfs4idmap.h"
#include "nfs4session.h"
#include "fscache.h"
#include "nfs42.h"
#include "nfs4trace.h"
#define NFSDBG_FACILITY …
#define NFS4_BITMASK_SZ …
#define NFS4_POLL_RETRY_MIN …
#define NFS4_POLL_RETRY_MAX …
#define NFS4_VALID_ATTRS …
struct nfs4_opendata;
static int _nfs4_recover_proc_open(struct nfs4_opendata *data);
static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
static void nfs_fixup_referral_attributes(struct nfs_fattr *fattr);
static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fattr *fattr, struct inode *inode);
static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
struct nfs_fattr *fattr, struct iattr *sattr,
struct nfs_open_context *ctx, struct nfs4_label *ilabel);
#ifdef CONFIG_NFS_V4_1
static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
const struct cred *cred,
struct nfs4_slot *slot,
bool is_privileged);
static int nfs41_test_stateid(struct nfs_server *, const nfs4_stateid *,
const struct cred *);
static int nfs41_free_stateid(struct nfs_server *, const nfs4_stateid *,
const struct cred *, bool);
#endif
#ifdef CONFIG_NFS_V4_SECURITY_LABEL
static inline struct nfs4_label *
nfs4_label_init_security(struct inode *dir, struct dentry *dentry,
struct iattr *sattr, struct nfs4_label *label)
{ … }
static inline void
nfs4_label_release_security(struct nfs4_label *label)
{ … }
static inline u32 *nfs4_bitmask(struct nfs_server *server, struct nfs4_label *label)
{ … }
#else
static inline struct nfs4_label *
nfs4_label_init_security(struct inode *dir, struct dentry *dentry,
struct iattr *sattr, struct nfs4_label *l)
{ return NULL; }
static inline void
nfs4_label_release_security(struct nfs4_label *label)
{ return; }
static inline u32 *
nfs4_bitmask(struct nfs_server *server, struct nfs4_label *label)
{ return server->attr_bitmask; }
#endif
static int nfs4_map_errors(int err)
{ … }
const u32 nfs4_fattr_bitmap[3] = …;
static const u32 nfs4_pnfs_open_bitmap[3] = …;
static const u32 nfs4_open_noattr_bitmap[3] = …;
const u32 nfs4_statfs_bitmap[3] = …;
const u32 nfs4_pathconf_bitmap[3] = …;
const u32 nfs4_fsinfo_bitmap[3] = …;
const u32 nfs4_fs_locations_bitmap[3] = …;
static void nfs4_bitmap_copy_adjust(__u32 *dst, const __u32 *src,
struct inode *inode, unsigned long flags)
{ … }
static void nfs4_setup_readdir(u64 cookie, __be32 *verifier, struct dentry *dentry,
struct nfs4_readdir_arg *readdir)
{ … }
static void nfs4_fattr_set_prechange(struct nfs_fattr *fattr, u64 version)
{ … }
static void nfs4_test_and_free_stateid(struct nfs_server *server,
nfs4_stateid *stateid,
const struct cred *cred)
{ … }
static void __nfs4_free_revoked_stateid(struct nfs_server *server,
nfs4_stateid *stateid,
const struct cred *cred)
{ … }
static void nfs4_free_revoked_stateid(struct nfs_server *server,
const nfs4_stateid *stateid,
const struct cred *cred)
{ … }
static long nfs4_update_delay(long *timeout)
{ … }
static int nfs4_delay_killable(long *timeout)
{ … }
static int nfs4_delay_interruptible(long *timeout)
{ … }
static int nfs4_delay(long *timeout, bool interruptible)
{ … }
static const nfs4_stateid *
nfs4_recoverable_stateid(const nfs4_stateid *stateid)
{ … }
static int nfs4_do_handle_exception(struct nfs_server *server,
int errorcode, struct nfs4_exception *exception)
{ … }
static int nfs4_exception_should_retrans(const struct nfs_server *server,
struct nfs4_exception *exception)
{ … }
int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_exception *exception)
{ … }
static int
nfs4_async_handle_exception(struct rpc_task *task, struct nfs_server *server,
int errorcode, struct nfs4_exception *exception)
{ … }
int
nfs4_async_handle_error(struct rpc_task *task, struct nfs_server *server,
struct nfs4_state *state, long *timeout)
{ … }
static bool _nfs4_is_integrity_protected(struct nfs_client *clp)
{ … }
static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp)
{ … }
static void renew_lease(const struct nfs_server *server, unsigned long timestamp)
{ … }
struct nfs4_call_sync_data { … };
void nfs4_init_sequence(struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res, int cache_reply,
int privileged)
{ … }
static void nfs40_sequence_free_slot(struct nfs4_sequence_res *res)
{ … }
static int nfs40_sequence_done(struct rpc_task *task,
struct nfs4_sequence_res *res)
{ … }
#if defined(CONFIG_NFS_V4_1)
static void nfs41_release_slot(struct nfs4_slot *slot)
{ … }
static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res)
{ … }
static void nfs4_slot_sequence_record_sent(struct nfs4_slot *slot,
u32 seqnr)
{ … }
static void nfs4_slot_sequence_acked(struct nfs4_slot *slot, u32 seqnr)
{ … }
static void nfs4_probe_sequence(struct nfs_client *client, const struct cred *cred,
struct nfs4_slot *slot)
{ … }
static int nfs41_sequence_process(struct rpc_task *task,
struct nfs4_sequence_res *res)
{ … }
int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *res)
{ … }
EXPORT_SYMBOL_GPL(…);
static int nfs4_sequence_process(struct rpc_task *task, struct nfs4_sequence_res *res)
{ … }
static void nfs4_sequence_free_slot(struct nfs4_sequence_res *res)
{ … }
int nfs4_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *res)
{ … }
EXPORT_SYMBOL_GPL(…);
static void nfs41_call_sync_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs41_call_sync_done(struct rpc_task *task, void *calldata)
{ … }
static const struct rpc_call_ops nfs41_call_sync_ops = …;
#else
static int nfs4_sequence_process(struct rpc_task *task, struct nfs4_sequence_res *res)
{
return nfs40_sequence_done(task, res);
}
static void nfs4_sequence_free_slot(struct nfs4_sequence_res *res)
{
if (res->sr_slot != NULL)
nfs40_sequence_free_slot(res);
}
int nfs4_sequence_done(struct rpc_task *task,
struct nfs4_sequence_res *res)
{
return nfs40_sequence_done(task, res);
}
EXPORT_SYMBOL_GPL(nfs4_sequence_done);
#endif
static void nfs41_sequence_res_init(struct nfs4_sequence_res *res)
{ … }
static
void nfs4_sequence_attach_slot(struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
struct nfs4_slot *slot)
{ … }
int nfs4_setup_sequence(struct nfs_client *client,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
struct rpc_task *task)
{ … }
EXPORT_SYMBOL_GPL(…);
static void nfs40_call_sync_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs40_call_sync_done(struct rpc_task *task, void *calldata)
{ … }
static const struct rpc_call_ops nfs40_call_sync_ops = …;
static int nfs4_call_sync_custom(struct rpc_task_setup *task_setup)
{ … }
static int nfs4_do_call_sync(struct rpc_clnt *clnt,
struct nfs_server *server,
struct rpc_message *msg,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
unsigned short task_flags)
{ … }
static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
struct nfs_server *server,
struct rpc_message *msg,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res)
{ … }
int nfs4_call_sync(struct rpc_clnt *clnt,
struct nfs_server *server,
struct rpc_message *msg,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
int cache_reply)
{ … }
static void
nfs4_inc_nlink_locked(struct inode *inode)
{ … }
static void
nfs4_inc_nlink(struct inode *inode)
{ … }
static void
nfs4_dec_nlink_locked(struct inode *inode)
{ … }
static void
nfs4_update_changeattr_locked(struct inode *inode,
struct nfs4_change_info *cinfo,
unsigned long timestamp, unsigned long cache_validity)
{ … }
void
nfs4_update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo,
unsigned long timestamp, unsigned long cache_validity)
{ … }
struct nfs4_open_createattrs { … };
static bool nfs4_clear_cap_atomic_open_v1(struct nfs_server *server,
int err, struct nfs4_exception *exception)
{ … }
static fmode_t _nfs4_ctx_to_accessmode(const struct nfs_open_context *ctx)
{ … }
static fmode_t _nfs4_ctx_to_openmode(const struct nfs_open_context *ctx)
{ … }
static u32
nfs4_fmode_to_share_access(fmode_t fmode)
{ … }
static u32
nfs4_map_atomic_open_share(struct nfs_server *server,
fmode_t fmode, int openflags)
{ … }
static enum open_claim_type4
nfs4_map_atomic_open_claim(struct nfs_server *server,
enum open_claim_type4 claim)
{ … }
static void nfs4_init_opendata_res(struct nfs4_opendata *p)
{ … }
static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry,
struct nfs4_state_owner *sp, fmode_t fmode, int flags,
const struct nfs4_open_createattrs *c,
enum open_claim_type4 claim,
gfp_t gfp_mask)
{ … }
static void nfs4_opendata_free(struct kref *kref)
{ … }
static void nfs4_opendata_put(struct nfs4_opendata *p)
{ … }
static bool nfs4_mode_match_open_stateid(struct nfs4_state *state,
fmode_t fmode)
{ … }
static int can_open_cached(struct nfs4_state *state, fmode_t mode,
int open_mode, enum open_claim_type4 claim)
{ … }
static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode,
enum open_claim_type4 claim)
{ … }
static void update_open_stateflags(struct nfs4_state *state, fmode_t fmode)
{ … }
#ifdef CONFIG_NFS_V4_1
static bool nfs_open_stateid_recover_openmode(struct nfs4_state *state)
{ … }
#endif
static void nfs_state_log_update_open_stateid(struct nfs4_state *state)
{ … }
static void nfs_test_and_clear_all_open_stateid(struct nfs4_state *state)
{ … }
static bool nfs_stateid_is_sequential(struct nfs4_state *state,
const nfs4_stateid *stateid)
{ … }
static void nfs_resync_open_stateid_locked(struct nfs4_state *state)
{ … }
static void nfs_clear_open_stateid_locked(struct nfs4_state *state,
nfs4_stateid *stateid, fmode_t fmode)
{ … }
static void nfs_clear_open_stateid(struct nfs4_state *state,
nfs4_stateid *arg_stateid,
nfs4_stateid *stateid, fmode_t fmode)
{ … }
static void nfs_set_open_stateid_locked(struct nfs4_state *state,
const nfs4_stateid *stateid, nfs4_stateid *freeme)
__must_hold(&state->owner->so_lock)
__must_hold(&state->seqlock)
__must_hold(RCU)
{ … }
static void nfs_state_set_open_stateid(struct nfs4_state *state,
const nfs4_stateid *open_stateid,
fmode_t fmode,
nfs4_stateid *freeme)
{ … }
static void nfs_state_clear_open_state_flags(struct nfs4_state *state)
{ … }
static void nfs_state_set_delegation(struct nfs4_state *state,
const nfs4_stateid *deleg_stateid,
fmode_t fmode)
{ … }
static void nfs_state_clear_delegation(struct nfs4_state *state)
{ … }
int update_open_stateid(struct nfs4_state *state,
const nfs4_stateid *open_stateid,
const nfs4_stateid *delegation,
fmode_t fmode)
{ … }
static bool nfs4_update_lock_stateid(struct nfs4_lock_state *lsp,
const nfs4_stateid *stateid)
{ … }
static void nfs4_return_incompatible_delegation(struct inode *inode, fmode_t fmode)
{ … }
static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata)
{ … }
static void
nfs4_process_delegation(struct inode *inode, const struct cred *cred,
enum open_claim_type4 claim,
const struct nfs4_open_delegation *delegation)
{ … }
static struct nfs4_state *
_nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)
{ … }
static struct inode *
nfs4_opendata_get_inode(struct nfs4_opendata *data)
{ … }
static struct nfs4_state *
nfs4_opendata_find_nfs4_state(struct nfs4_opendata *data)
{ … }
static struct nfs4_state *
_nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data)
{ … }
static struct nfs4_state *
nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data)
{ … }
static struct nfs_open_context *
nfs4_state_find_open_context_mode(struct nfs4_state *state, fmode_t mode)
{ … }
static struct nfs_open_context *
nfs4_state_find_open_context(struct nfs4_state *state)
{ … }
static struct nfs4_opendata *nfs4_open_recoverdata_alloc(struct nfs_open_context *ctx,
struct nfs4_state *state, enum open_claim_type4 claim)
{ … }
static int nfs4_open_recover_helper(struct nfs4_opendata *opendata,
fmode_t fmode)
{ … }
static int nfs4_open_recover(struct nfs4_opendata *opendata, struct nfs4_state *state)
{ … }
static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
{ … }
static int nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
{ … }
static int nfs4_open_reclaim(struct nfs4_state_owner *sp, struct nfs4_state *state)
{ … }
static int nfs4_handle_delegation_recall_error(struct nfs_server *server, struct nfs4_state *state, const nfs4_stateid *stateid, struct file_lock *fl, int err)
{ … }
int nfs4_open_delegation_recall(struct nfs_open_context *ctx,
struct nfs4_state *state, const nfs4_stateid *stateid)
{ … }
static void nfs4_open_confirm_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_open_confirm_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_open_confirm_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs4_open_confirm_ops = …;
static int _nfs4_proc_open_confirm(struct nfs4_opendata *data)
{ … }
static void nfs4_open_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_open_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_open_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs4_open_ops = …;
static int nfs4_run_open_task(struct nfs4_opendata *data,
struct nfs_open_context *ctx)
{ … }
static int _nfs4_recover_proc_open(struct nfs4_opendata *data)
{ … }
static int nfs4_opendata_access(const struct cred *cred,
struct nfs4_opendata *opendata,
struct nfs4_state *state, fmode_t fmode)
{ … }
static int _nfs4_proc_open(struct nfs4_opendata *data,
struct nfs_open_context *ctx)
{ … }
static int _nfs4_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
{ … }
static int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
{ … }
static int nfs4_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *state)
{ … }
static void nfs_finish_clear_delegation_stateid(struct nfs4_state *state,
const nfs4_stateid *stateid)
{ … }
static void nfs40_clear_delegation_stateid(struct nfs4_state *state)
{ … }
static int nfs40_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *state)
{ … }
static int nfs40_test_and_free_expired_stateid(struct nfs_server *server,
const nfs4_stateid *stateid,
const struct cred *cred)
{ … }
#if defined(CONFIG_NFS_V4_1)
static int nfs41_test_and_free_expired_stateid(struct nfs_server *server,
const nfs4_stateid *stateid,
const struct cred *cred)
{ … }
static int nfs41_check_delegation_stateid(struct nfs4_state *state)
{ … }
static void nfs41_delegation_recover_stateid(struct nfs4_state *state)
{ … }
static int nfs41_check_expired_locks(struct nfs4_state *state)
{ … }
static int nfs41_check_open_stateid(struct nfs4_state *state)
{ … }
static int nfs41_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *state)
{ … }
#endif
static unsigned nfs4_exclusive_attrset(struct nfs4_opendata *opendata,
struct iattr *sattr, struct nfs4_label **label)
{ … }
static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
struct nfs_open_context *ctx)
{ … }
static int _nfs4_do_open(struct inode *dir,
struct nfs_open_context *ctx,
int flags,
const struct nfs4_open_createattrs *c,
int *opened)
{ … }
static struct nfs4_state *nfs4_do_open(struct inode *dir,
struct nfs_open_context *ctx,
int flags,
struct iattr *sattr,
struct nfs4_label *label,
int *opened)
{ … }
static int _nfs4_do_setattr(struct inode *inode,
struct nfs_setattrargs *arg,
struct nfs_setattrres *res,
const struct cred *cred,
struct nfs_open_context *ctx)
{ … }
static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
struct nfs_fattr *fattr, struct iattr *sattr,
struct nfs_open_context *ctx, struct nfs4_label *ilabel)
{ … }
static bool
nfs4_wait_on_layoutreturn(struct inode *inode, struct rpc_task *task)
{ … }
static void nfs4_sync_open_stateid(nfs4_stateid *dst,
struct nfs4_state *state)
{ … }
static bool nfs4_refresh_open_old_stateid(nfs4_stateid *dst,
struct nfs4_state *state)
{ … }
struct nfs4_closedata { … };
static void nfs4_free_closedata(void *data)
{ … }
static void nfs4_close_done(struct rpc_task *task, void *data)
{ … }
static void nfs4_close_prepare(struct rpc_task *task, void *data)
{ … }
static const struct rpc_call_ops nfs4_close_ops = …;
int nfs4_do_close(struct nfs4_state *state, gfp_t gfp_mask, int wait)
{ … }
static struct inode *
nfs4_atomic_open(struct inode *dir, struct nfs_open_context *ctx,
int open_flags, struct iattr *attr, int *opened)
{ … }
static void nfs4_close_context(struct nfs_open_context *ctx, int is_sync)
{ … }
#define FATTR4_WORD1_NFS40_MASK …
#define FATTR4_WORD2_NFS41_MASK …
#define FATTR4_WORD2_NFS42_MASK …
static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
{ … }
int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
{ … }
static void test_fs_location_for_trunking(struct nfs4_fs_location *location,
struct nfs_client *clp,
struct nfs_server *server)
{ … }
static bool _is_same_nfs4_pathname(struct nfs4_pathname *path1,
struct nfs4_pathname *path2)
{ … }
static int _nfs4_discover_trunking(struct nfs_server *server,
struct nfs_fh *fhandle)
{ … }
static int nfs4_discover_trunking(struct nfs_server *server,
struct nfs_fh *fhandle)
{ … }
static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{ … }
static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{ … }
static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info, rpc_authflavor_t flavor)
{ … }
static int nfs4_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{ … }
int nfs4_proc_get_rootfh(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info,
bool auth_probe)
{ … }
static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *mntfh,
struct nfs_fsinfo *info)
{ … }
static int nfs4_get_referral(struct rpc_clnt *client, struct inode *dir,
const struct qstr *name, struct nfs_fattr *fattr,
struct nfs_fh *fhandle)
{ … }
static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fattr *fattr, struct inode *inode)
{ … }
int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fattr *fattr, struct inode *inode)
{ … }
static int
nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
struct iattr *sattr)
{ … }
static int _nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir,
struct dentry *dentry, struct nfs_fh *fhandle,
struct nfs_fattr *fattr)
{ … }
static void nfs_fixup_secinfo_attributes(struct nfs_fattr *fattr)
{ … }
static int nfs4_proc_lookup_common(struct rpc_clnt **clnt, struct inode *dir,
struct dentry *dentry, struct nfs_fh *fhandle,
struct nfs_fattr *fattr)
{ … }
static int nfs4_proc_lookup(struct inode *dir, struct dentry *dentry,
struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ … }
struct rpc_clnt *
nfs4_proc_lookup_mountpoint(struct inode *dir, struct dentry *dentry,
struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ … }
static int _nfs4_proc_lookupp(struct inode *inode,
struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ … }
static int nfs4_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle,
struct nfs_fattr *fattr)
{ … }
static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry,
const struct cred *cred)
{ … }
static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry,
const struct cred *cred)
{ … }
static int _nfs4_proc_readlink(struct inode *inode, struct page *page,
unsigned int pgbase, unsigned int pglen)
{ … }
static int nfs4_proc_readlink(struct inode *inode, struct page *page,
unsigned int pgbase, unsigned int pglen)
{ … }
static int
nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
int flags)
{ … }
static int
_nfs4_proc_remove(struct inode *dir, const struct qstr *name, u32 ftype)
{ … }
static int nfs4_proc_remove(struct inode *dir, struct dentry *dentry)
{ … }
static int nfs4_proc_rmdir(struct inode *dir, const struct qstr *name)
{ … }
static void nfs4_proc_unlink_setup(struct rpc_message *msg,
struct dentry *dentry,
struct inode *inode)
{ … }
static void nfs4_proc_unlink_rpc_prepare(struct rpc_task *task, struct nfs_unlinkdata *data)
{ … }
static int nfs4_proc_unlink_done(struct rpc_task *task, struct inode *dir)
{ … }
static void nfs4_proc_rename_setup(struct rpc_message *msg,
struct dentry *old_dentry,
struct dentry *new_dentry)
{ … }
static void nfs4_proc_rename_rpc_prepare(struct rpc_task *task, struct nfs_renamedata *data)
{ … }
static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir,
struct inode *new_dir)
{ … }
static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name)
{ … }
static int nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name)
{ … }
struct nfs4_createdata { … };
static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
const struct qstr *name, struct iattr *sattr, u32 ftype)
{ … }
static int nfs4_do_create(struct inode *dir, struct dentry *dentry, struct nfs4_createdata *data)
{ … }
static void nfs4_free_createdata(struct nfs4_createdata *data)
{ … }
static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
struct folio *folio, unsigned int len, struct iattr *sattr,
struct nfs4_label *label)
{ … }
static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
struct folio *folio, unsigned int len, struct iattr *sattr)
{ … }
static int _nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry,
struct iattr *sattr, struct nfs4_label *label)
{ … }
static int nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry,
struct iattr *sattr)
{ … }
static int _nfs4_proc_readdir(struct nfs_readdir_arg *nr_arg,
struct nfs_readdir_res *nr_res)
{ … }
static int nfs4_proc_readdir(struct nfs_readdir_arg *arg,
struct nfs_readdir_res *res)
{ … }
static int _nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
struct iattr *sattr, struct nfs4_label *label, dev_t rdev)
{ … }
static int nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
struct iattr *sattr, dev_t rdev)
{ … }
static int _nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsstat *fsstat)
{ … }
static int nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsstat *fsstat)
{ … }
static int _nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *fsinfo)
{ … }
static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
{ … }
static int nfs4_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
{ … }
static int _nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_pathconf *pathconf)
{ … }
static int nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_pathconf *pathconf)
{ … }
int nfs4_set_rw_stateid(nfs4_stateid *stateid,
const struct nfs_open_context *ctx,
const struct nfs_lock_context *l_ctx,
fmode_t fmode)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool nfs4_stateid_is_current(nfs4_stateid *stateid,
const struct nfs_open_context *ctx,
const struct nfs_lock_context *l_ctx,
fmode_t fmode)
{ … }
static bool nfs4_error_stateid_expired(int err)
{ … }
static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_pgio_header *hdr)
{ … }
static bool nfs4_read_stateid_changed(struct rpc_task *task,
struct nfs_pgio_args *args)
{ … }
static bool nfs4_read_plus_not_supported(struct rpc_task *task,
struct nfs_pgio_header *hdr)
{ … }
static int nfs4_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
{ … }
#if defined CONFIG_NFS_V4_2 && defined CONFIG_NFS_V4_2_READ_PLUS
static bool nfs42_read_plus_support(struct nfs_pgio_header *hdr,
struct rpc_message *msg)
{ … }
#else
static bool nfs42_read_plus_support(struct nfs_pgio_header *hdr,
struct rpc_message *msg)
{
return false;
}
#endif
static void nfs4_proc_read_setup(struct nfs_pgio_header *hdr,
struct rpc_message *msg)
{ … }
static int nfs4_proc_pgio_rpc_prepare(struct rpc_task *task,
struct nfs_pgio_header *hdr)
{ … }
static int nfs4_write_done_cb(struct rpc_task *task,
struct nfs_pgio_header *hdr)
{ … }
static bool nfs4_write_stateid_changed(struct rpc_task *task,
struct nfs_pgio_args *args)
{ … }
static int nfs4_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
{ … }
static
bool nfs4_write_need_cache_consistency_data(struct nfs_pgio_header *hdr)
{ … }
void nfs4_bitmask_set(__u32 bitmask[], const __u32 src[],
struct inode *inode, unsigned long cache_validity)
{ … }
static void nfs4_proc_write_setup(struct nfs_pgio_header *hdr,
struct rpc_message *msg,
struct rpc_clnt **clnt)
{ … }
static void nfs4_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commit_data *data)
{ … }
static int nfs4_commit_done_cb(struct rpc_task *task, struct nfs_commit_data *data)
{ … }
static int nfs4_commit_done(struct rpc_task *task, struct nfs_commit_data *data)
{ … }
static void nfs4_proc_commit_setup(struct nfs_commit_data *data, struct rpc_message *msg,
struct rpc_clnt **clnt)
{ … }
static int _nfs4_proc_commit(struct file *dst, struct nfs_commitargs *args,
struct nfs_commitres *res)
{ … }
int nfs4_proc_commit(struct file *dst, __u64 offset, __u32 count, struct nfs_commitres *res)
{ … }
struct nfs4_renewdata { … };
static void nfs4_renew_release(void *calldata)
{ … }
static void nfs4_renew_done(struct rpc_task *task, void *calldata)
{ … }
static const struct rpc_call_ops nfs4_renew_ops = …;
static int nfs4_proc_async_renew(struct nfs_client *clp, const struct cred *cred, unsigned renew_flags)
{ … }
static int nfs4_proc_renew(struct nfs_client *clp, const struct cred *cred)
{ … }
static bool nfs4_server_supports_acls(const struct nfs_server *server,
enum nfs4_acl_type type)
{ … }
#define NFS4ACL_MAXPAGES …
int nfs4_buf_to_pages_noslab(const void *buf, size_t buflen,
struct page **pages)
{ … }
struct nfs4_cached_acl { … };
static void nfs4_set_cached_acl(struct inode *inode, struct nfs4_cached_acl *acl)
{ … }
static void nfs4_zap_acl_attr(struct inode *inode)
{ … }
static ssize_t nfs4_read_cached_acl(struct inode *inode, char *buf,
size_t buflen, enum nfs4_acl_type type)
{ … }
static void nfs4_write_cached_acl(struct inode *inode, struct page **pages,
size_t pgbase, size_t acl_len,
enum nfs4_acl_type type)
{ … }
static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf,
size_t buflen, enum nfs4_acl_type type)
{ … }
static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf,
size_t buflen, enum nfs4_acl_type type)
{ … }
static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen,
enum nfs4_acl_type type)
{ … }
static int __nfs4_proc_set_acl(struct inode *inode, const void *buf,
size_t buflen, enum nfs4_acl_type type)
{ … }
static int nfs4_proc_set_acl(struct inode *inode, const void *buf,
size_t buflen, enum nfs4_acl_type type)
{ … }
#ifdef CONFIG_NFS_V4_SECURITY_LABEL
static int _nfs4_get_security_label(struct inode *inode, void *buf,
size_t buflen)
{ … }
static int nfs4_get_security_label(struct inode *inode, void *buf,
size_t buflen)
{ … }
static int _nfs4_do_set_security_label(struct inode *inode,
struct nfs4_label *ilabel,
struct nfs_fattr *fattr)
{ … }
static int nfs4_do_set_security_label(struct inode *inode,
struct nfs4_label *ilabel,
struct nfs_fattr *fattr)
{ … }
static int
nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen)
{ … }
#endif
static void nfs4_init_boot_verifier(const struct nfs_client *clp,
nfs4_verifier *bootverf)
{ … }
static size_t
nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t buflen)
{ … }
static int
nfs4_init_nonuniform_client_string(struct nfs_client *clp)
{ … }
static int
nfs4_init_uniform_client_string(struct nfs_client *clp)
{ … }
static unsigned int
nfs4_init_callback_netid(const struct nfs_client *clp, char *buf, size_t len)
{ … }
static void nfs4_setclientid_done(struct rpc_task *task, void *calldata)
{ … }
static const struct rpc_call_ops nfs4_setclientid_ops = …;
int nfs4_proc_setclientid(struct nfs_client *clp, u32 program,
unsigned short port, const struct cred *cred,
struct nfs4_setclientid_res *res)
{ … }
int nfs4_proc_setclientid_confirm(struct nfs_client *clp,
struct nfs4_setclientid_res *arg,
const struct cred *cred)
{ … }
struct nfs4_delegreturndata { … };
static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_delegreturn_release(void *calldata)
{ … }
static void nfs4_delegreturn_prepare(struct rpc_task *task, void *data)
{ … }
static const struct rpc_call_ops nfs4_delegreturn_ops = …;
static int _nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred,
const nfs4_stateid *stateid,
struct nfs_delegation *delegation,
int issync)
{ … }
int nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred,
const nfs4_stateid *stateid,
struct nfs_delegation *delegation, int issync)
{ … }
static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{ … }
static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{ … }
static bool nfs4_refresh_lock_old_stateid(nfs4_stateid *dst,
struct nfs4_lock_state *lsp)
{ … }
static bool nfs4_sync_lock_stateid(nfs4_stateid *dst,
struct nfs4_lock_state *lsp)
{ … }
struct nfs4_unlockdata { … };
static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
struct nfs_open_context *ctx,
struct nfs4_lock_state *lsp,
struct nfs_seqid *seqid)
{ … }
static void nfs4_locku_release_calldata(void *data)
{ … }
static void nfs4_locku_done(struct rpc_task *task, void *data)
{ … }
static void nfs4_locku_prepare(struct rpc_task *task, void *data)
{ … }
static const struct rpc_call_ops nfs4_locku_ops = …;
static struct rpc_task *nfs4_do_unlck(struct file_lock *fl,
struct nfs_open_context *ctx,
struct nfs4_lock_state *lsp,
struct nfs_seqid *seqid)
{ … }
static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock *request)
{ … }
struct nfs4_lockdata { … };
static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl,
struct nfs_open_context *ctx, struct nfs4_lock_state *lsp,
gfp_t gfp_mask)
{ … }
static void nfs4_lock_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_lock_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_lock_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs4_lock_ops = …;
static void nfs4_handle_setlk_error(struct nfs_server *server, struct nfs4_lock_state *lsp, int new_lock_owner, int error)
{ … }
static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *fl, int recovery_type)
{ … }
static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
{ … }
static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request)
{ … }
#if defined(CONFIG_NFS_V4_1)
static int nfs41_lock_expired(struct nfs4_state *state, struct file_lock *request)
{ … }
#endif
static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{ … }
static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{ … }
#define NFS4_LOCK_MINTIMEOUT …
#define NFS4_LOCK_MAXTIMEOUT …
static int
nfs4_retry_setlk_simple(struct nfs4_state *state, int cmd,
struct file_lock *request)
{ … }
#ifdef CONFIG_NFS_V4_1
struct nfs4_lock_waiter { … };
static int
nfs4_wake_lock_waiter(wait_queue_entry_t *wait, unsigned int mode, int flags, void *key)
{ … }
static int
nfs4_retry_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{ … }
#else
static inline int
nfs4_retry_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
return nfs4_retry_setlk_simple(state, cmd, request);
}
#endif
static int
nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
{ … }
static int nfs4_delete_lease(struct file *file, void **priv)
{ … }
static int nfs4_add_lease(struct file *file, int arg, struct file_lease **lease,
void **priv)
{ … }
int nfs4_proc_setlease(struct file *file, int arg, struct file_lease **lease,
void **priv)
{ … }
int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state, const nfs4_stateid *stateid)
{ … }
struct nfs_release_lockowner_data { … };
static void nfs4_release_lockowner_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_release_lockowner_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_release_lockowner_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs4_release_lockowner_ops = …;
static void
nfs4_release_lockowner(struct nfs_server *server, struct nfs4_lock_state *lsp)
{ … }
#define XATTR_NAME_NFSV4_ACL …
static int nfs4_xattr_set_nfs4_acl(const struct xattr_handler *handler,
struct mnt_idmap *idmap,
struct dentry *unused, struct inode *inode,
const char *key, const void *buf,
size_t buflen, int flags)
{ … }
static int nfs4_xattr_get_nfs4_acl(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *key, void *buf, size_t buflen)
{ … }
static bool nfs4_xattr_list_nfs4_acl(struct dentry *dentry)
{ … }
#if defined(CONFIG_NFS_V4_1)
#define XATTR_NAME_NFSV4_DACL …
static int nfs4_xattr_set_nfs4_dacl(const struct xattr_handler *handler,
struct mnt_idmap *idmap,
struct dentry *unused, struct inode *inode,
const char *key, const void *buf,
size_t buflen, int flags)
{ … }
static int nfs4_xattr_get_nfs4_dacl(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *key, void *buf, size_t buflen)
{ … }
static bool nfs4_xattr_list_nfs4_dacl(struct dentry *dentry)
{ … }
#define XATTR_NAME_NFSV4_SACL …
static int nfs4_xattr_set_nfs4_sacl(const struct xattr_handler *handler,
struct mnt_idmap *idmap,
struct dentry *unused, struct inode *inode,
const char *key, const void *buf,
size_t buflen, int flags)
{ … }
static int nfs4_xattr_get_nfs4_sacl(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *key, void *buf, size_t buflen)
{ … }
static bool nfs4_xattr_list_nfs4_sacl(struct dentry *dentry)
{ … }
#endif
#ifdef CONFIG_NFS_V4_SECURITY_LABEL
static int nfs4_xattr_set_nfs4_label(const struct xattr_handler *handler,
struct mnt_idmap *idmap,
struct dentry *unused, struct inode *inode,
const char *key, const void *buf,
size_t buflen, int flags)
{ … }
static int nfs4_xattr_get_nfs4_label(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *key, void *buf, size_t buflen)
{ … }
static ssize_t
nfs4_listxattr_nfs4_label(struct inode *inode, char *list, size_t list_len)
{ … }
static const struct xattr_handler nfs4_xattr_nfs4_label_handler = …;
#else
static ssize_t
nfs4_listxattr_nfs4_label(struct inode *inode, char *list, size_t list_len)
{
return 0;
}
#endif
#ifdef CONFIG_NFS_V4_2
static int nfs4_xattr_set_nfs4_user(const struct xattr_handler *handler,
struct mnt_idmap *idmap,
struct dentry *unused, struct inode *inode,
const char *key, const void *buf,
size_t buflen, int flags)
{ … }
static int nfs4_xattr_get_nfs4_user(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *key, void *buf, size_t buflen)
{ … }
static ssize_t
nfs4_listxattr_nfs4_user(struct inode *inode, char *list, size_t list_len)
{ … }
#else
static ssize_t
nfs4_listxattr_nfs4_user(struct inode *inode, char *list, size_t list_len)
{
return 0;
}
#endif
static void nfs_fixup_referral_attributes(struct nfs_fattr *fattr)
{ … }
static int _nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir,
const struct qstr *name,
struct nfs4_fs_locations *fs_locations,
struct page *page)
{ … }
int nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir,
const struct qstr *name,
struct nfs4_fs_locations *fs_locations,
struct page *page)
{ … }
static int _nfs40_proc_get_locations(struct nfs_server *server,
struct nfs_fh *fhandle,
struct nfs4_fs_locations *locations,
struct page *page, const struct cred *cred)
{ … }
#ifdef CONFIG_NFS_V4_1
static int _nfs41_proc_get_locations(struct nfs_server *server,
struct nfs_fh *fhandle,
struct nfs4_fs_locations *locations,
struct page *page, const struct cred *cred)
{ … }
#endif
int nfs4_proc_get_locations(struct nfs_server *server,
struct nfs_fh *fhandle,
struct nfs4_fs_locations *locations,
struct page *page, const struct cred *cred)
{ … }
static int _nfs40_proc_fsid_present(struct inode *inode, const struct cred *cred)
{ … }
#ifdef CONFIG_NFS_V4_1
static int _nfs41_proc_fsid_present(struct inode *inode, const struct cred *cred)
{ … }
#endif
int nfs4_proc_fsid_present(struct inode *inode, const struct cred *cred)
{ … }
static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors, bool use_integrity)
{ … }
int nfs4_proc_secinfo(struct inode *dir, const struct qstr *name,
struct nfs4_secinfo_flavors *flavors)
{ … }
#ifdef CONFIG_NFS_V4_1
static int nfs4_check_cl_exchange_flags(u32 flags, u32 version)
{ … }
static bool
nfs41_same_server_scope(struct nfs41_server_scope *a,
struct nfs41_server_scope *b)
{ … }
static void
nfs4_bind_one_conn_to_session_done(struct rpc_task *task, void *calldata)
{ … }
static const struct rpc_call_ops nfs4_bind_one_conn_to_session_ops = …;
static
int nfs4_proc_bind_one_conn_to_session(struct rpc_clnt *clnt,
struct rpc_xprt *xprt,
struct nfs_client *clp,
const struct cred *cred)
{ … }
struct rpc_bind_conn_calldata { … };
static int
nfs4_proc_bind_conn_to_session_callback(struct rpc_clnt *clnt,
struct rpc_xprt *xprt,
void *calldata)
{ … }
int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, const struct cred *cred)
{ … }
static const struct nfs41_state_protection nfs4_sp4_mach_cred_request = …;
static int nfs4_sp4_select_mode(struct nfs_client *clp,
struct nfs41_state_protection *sp)
{ … }
struct nfs41_exchange_id_data { … };
static void nfs4_exchange_id_release(void *data)
{ … }
static const struct rpc_call_ops nfs4_exchange_id_call_ops = …;
static struct rpc_task *
nfs4_run_exchange_id(struct nfs_client *clp, const struct cred *cred,
u32 sp4_how, struct rpc_xprt *xprt)
{ … }
static int _nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred,
u32 sp4_how)
{ … }
int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred)
{ … }
void nfs4_test_session_trunk(struct rpc_clnt *clnt, struct rpc_xprt *xprt,
void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
static int _nfs4_proc_destroy_clientid(struct nfs_client *clp,
const struct cred *cred)
{ … }
static int nfs4_proc_destroy_clientid(struct nfs_client *clp,
const struct cred *cred)
{ … }
int nfs4_destroy_clientid(struct nfs_client *clp)
{ … }
#endif
struct nfs4_get_lease_time_data { … };
static void nfs4_get_lease_time_prepare(struct rpc_task *task,
void *calldata)
{ … }
static void nfs4_get_lease_time_done(struct rpc_task *task, void *calldata)
{ … }
static const struct rpc_call_ops nfs4_get_lease_time_ops = …;
int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)
{ … }
#ifdef CONFIG_NFS_V4_1
static void nfs4_init_channel_attrs(struct nfs41_create_session_args *args,
struct rpc_clnt *clnt)
{ … }
static int nfs4_verify_fore_channel_attrs(struct nfs41_create_session_args *args,
struct nfs41_create_session_res *res)
{ … }
static int nfs4_verify_back_channel_attrs(struct nfs41_create_session_args *args,
struct nfs41_create_session_res *res)
{ … }
static int nfs4_verify_channel_attrs(struct nfs41_create_session_args *args,
struct nfs41_create_session_res *res)
{ … }
static void nfs4_update_session(struct nfs4_session *session,
struct nfs41_create_session_res *res)
{ … }
static int _nfs4_proc_create_session(struct nfs_client *clp,
const struct cred *cred)
{ … }
int nfs4_proc_create_session(struct nfs_client *clp, const struct cred *cred)
{ … }
int nfs4_proc_destroy_session(struct nfs4_session *session,
const struct cred *cred)
{ … }
struct nfs4_sequence_data { … };
static void nfs41_sequence_release(void *data)
{ … }
static int nfs41_sequence_handle_errors(struct rpc_task *task, struct nfs_client *clp)
{ … }
static void nfs41_sequence_call_done(struct rpc_task *task, void *data)
{ … }
static void nfs41_sequence_prepare(struct rpc_task *task, void *data)
{ … }
static const struct rpc_call_ops nfs41_sequence_ops = …;
static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
const struct cred *cred,
struct nfs4_slot *slot,
bool is_privileged)
{ … }
static int nfs41_proc_async_sequence(struct nfs_client *clp, const struct cred *cred, unsigned renew_flags)
{ … }
static int nfs4_proc_sequence(struct nfs_client *clp, const struct cred *cred)
{ … }
struct nfs4_reclaim_complete_data { … };
static void nfs4_reclaim_complete_prepare(struct rpc_task *task, void *data)
{ … }
static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nfs_client *clp)
{ … }
static void nfs4_reclaim_complete_done(struct rpc_task *task, void *data)
{ … }
static void nfs4_free_reclaim_complete_data(void *data)
{ … }
static const struct rpc_call_ops nfs4_reclaim_complete_call_ops = …;
static int nfs41_proc_reclaim_complete(struct nfs_client *clp,
const struct cred *cred)
{ … }
static void
nfs4_layoutget_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)
{ … }
static int
nfs4_layoutget_handle_exception(struct rpc_task *task,
struct nfs4_layoutget *lgp, struct nfs4_exception *exception)
{ … }
size_t max_response_pages(struct nfs_server *server)
{ … }
static void nfs4_layoutget_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs4_layoutget_call_ops = …;
struct pnfs_layout_segment *
nfs4_proc_layoutget(struct nfs4_layoutget *lgp,
struct nfs4_exception *exception)
{ … }
static void
nfs4_layoutreturn_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_layoutreturn_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs4_layoutreturn_call_ops = …;
int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp, unsigned int flags)
{ … }
static int
_nfs4_proc_getdeviceinfo(struct nfs_server *server,
struct pnfs_device *pdev,
const struct cred *cred)
{ … }
int nfs4_proc_getdeviceinfo(struct nfs_server *server,
struct pnfs_device *pdev,
const struct cred *cred)
{ … }
EXPORT_SYMBOL_GPL(…);
static void nfs4_layoutcommit_prepare(struct rpc_task *task, void *calldata)
{ … }
static void
nfs4_layoutcommit_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs4_layoutcommit_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs4_layoutcommit_ops = …;
int
nfs4_proc_layoutcommit(struct nfs4_layoutcommit_data *data, bool sync)
{ … }
static int
_nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info,
struct nfs4_secinfo_flavors *flavors, bool use_integrity)
{ … }
static int
nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info, struct nfs4_secinfo_flavors *flavors)
{ … }
static int
nfs41_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{ … }
static int _nfs41_test_stateid(struct nfs_server *server,
const nfs4_stateid *stateid,
const struct cred *cred)
{ … }
static void nfs4_handle_delay_or_session_error(struct nfs_server *server,
int err, struct nfs4_exception *exception)
{ … }
static int nfs41_test_stateid(struct nfs_server *server,
const nfs4_stateid *stateid,
const struct cred *cred)
{ … }
struct nfs_free_stateid_data { … };
static void nfs41_free_stateid_prepare(struct rpc_task *task, void *calldata)
{ … }
static void nfs41_free_stateid_done(struct rpc_task *task, void *calldata)
{ … }
static void nfs41_free_stateid_release(void *calldata)
{ … }
static const struct rpc_call_ops nfs41_free_stateid_ops = …;
static int nfs41_free_stateid(struct nfs_server *server,
const nfs4_stateid *stateid,
const struct cred *cred,
bool privileged)
{ … }
static void
nfs41_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp)
{ … }
static bool nfs41_match_stateid(const nfs4_stateid *s1,
const nfs4_stateid *s2)
{ … }
#endif
static bool nfs4_match_stateid(const nfs4_stateid *s1,
const nfs4_stateid *s2)
{ … }
static const struct nfs4_state_recovery_ops nfs40_reboot_recovery_ops = …;
#if defined(CONFIG_NFS_V4_1)
static const struct nfs4_state_recovery_ops nfs41_reboot_recovery_ops = …;
#endif
static const struct nfs4_state_recovery_ops nfs40_nograce_recovery_ops = …;
#if defined(CONFIG_NFS_V4_1)
static const struct nfs4_state_recovery_ops nfs41_nograce_recovery_ops = …;
#endif
static const struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = …;
#if defined(CONFIG_NFS_V4_1)
static const struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = …;
#endif
static const struct nfs4_mig_recovery_ops nfs40_mig_recovery_ops = …;
#if defined(CONFIG_NFS_V4_1)
static const struct nfs4_mig_recovery_ops nfs41_mig_recovery_ops = …;
#endif
static const struct nfs4_minor_version_ops nfs_v4_0_minor_ops = …;
#if defined(CONFIG_NFS_V4_1)
static struct nfs_seqid *
nfs_alloc_no_seqid(struct nfs_seqid_counter *arg1, gfp_t arg2)
{ … }
static const struct nfs4_minor_version_ops nfs_v4_1_minor_ops = …;
#endif
#if defined(CONFIG_NFS_V4_2)
static const struct nfs4_minor_version_ops nfs_v4_2_minor_ops = …;
#endif
const struct nfs4_minor_version_ops *nfs_v4_minor_ops[] = …;
static ssize_t nfs4_listxattr(struct dentry *dentry, char *list, size_t size)
{ … }
static void nfs4_enable_swap(struct inode *inode)
{ … }
static void nfs4_disable_swap(struct inode *inode)
{ … }
static const struct inode_operations nfs4_dir_inode_operations = …;
static const struct inode_operations nfs4_file_inode_operations = …;
const struct nfs_rpc_ops nfs_v4_clientops = …;
static const struct xattr_handler nfs4_xattr_nfs4_acl_handler = …;
#if defined(CONFIG_NFS_V4_1)
static const struct xattr_handler nfs4_xattr_nfs4_dacl_handler = …;
static const struct xattr_handler nfs4_xattr_nfs4_sacl_handler = …;
#endif
#ifdef CONFIG_NFS_V4_2
static const struct xattr_handler nfs4_xattr_nfs4_user_handler = …;
#endif
const struct xattr_handler * const nfs4_xattr_handlers[] = …;