#include <linux/file.h>
#include <linux/slab.h>
#include <linux/namei.h>
#include <linux/statfs.h>
#include <linux/utsname.h>
#include <linux/pagemap.h>
#include <linux/sunrpc/svcauth_gss.h>
#include <linux/sunrpc/addr.h>
#include <linux/xattr.h>
#include <linux/vmalloc.h>
#include <uapi/linux/xattr.h>
#include "idmap.h"
#include "acl.h"
#include "xdr4.h"
#include "vfs.h"
#include "state.h"
#include "cache.h"
#include "netns.h"
#include "pnfs.h"
#include "filecache.h"
#include "trace.h"
#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
#include <linux/security.h>
#endif
#define NFSDDBG_FACILITY …
const u32 nfsd_suppattrs[3][3] = …;
#define NFS4_REFERRAL_FSID_MAJOR …
#define NFS4_REFERRAL_FSID_MINOR …
static __be32
check_filename(char *str, int len)
{ … }
static int zero_clientid(clientid_t *clid)
{ … }
static void *
svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, size_t len)
{ … }
static char *
svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, size_t len)
{ … }
static void *
svcxdr_savemem(struct nfsd4_compoundargs *argp, __be32 *p, size_t len)
{ … }
static __be32
nfsd4_decode_ignored_string(struct nfsd4_compoundargs *argp, u32 maxlen)
{ … }
static __be32
nfsd4_decode_opaque(struct nfsd4_compoundargs *argp, struct xdr_netobj *o)
{ … }
static __be32
nfsd4_decode_component4(struct nfsd4_compoundargs *argp, char **namp, u32 *lenp)
{ … }
static __be32
nfsd4_decode_nfstime4(struct nfsd4_compoundargs *argp, struct timespec64 *tv)
{ … }
static __be32
nfsd4_decode_verifier4(struct nfsd4_compoundargs *argp, nfs4_verifier *verf)
{ … }
static __be32
nfsd4_decode_bitmap4(struct nfsd4_compoundargs *argp, u32 *bmval, u32 bmlen)
{ … }
static __be32
nfsd4_decode_nfsace4(struct nfsd4_compoundargs *argp, struct nfs4_ace *ace)
{ … }
static noinline __be32
nfsd4_decode_acl(struct nfsd4_compoundargs *argp, struct nfs4_acl **acl)
{ … }
static noinline __be32
nfsd4_decode_security_label(struct nfsd4_compoundargs *argp,
struct xdr_netobj *label)
{ … }
static __be32
nfsd4_decode_fattr4(struct nfsd4_compoundargs *argp, u32 *bmval, u32 bmlen,
struct iattr *iattr, struct nfs4_acl **acl,
struct xdr_netobj *label, int *umask)
{ … }
static __be32
nfsd4_decode_stateid4(struct nfsd4_compoundargs *argp, stateid_t *sid)
{ … }
static __be32
nfsd4_decode_clientid4(struct nfsd4_compoundargs *argp, clientid_t *clientid)
{ … }
static __be32
nfsd4_decode_state_owner4(struct nfsd4_compoundargs *argp,
clientid_t *clientid, struct xdr_netobj *owner)
{ … }
#ifdef CONFIG_NFSD_PNFS
static __be32
nfsd4_decode_deviceid4(struct nfsd4_compoundargs *argp,
struct nfsd4_deviceid *devid)
{ … }
static __be32
nfsd4_decode_layoutupdate4(struct nfsd4_compoundargs *argp,
struct nfsd4_layoutcommit *lcp)
{ … }
static __be32
nfsd4_decode_layoutreturn4(struct nfsd4_compoundargs *argp,
struct nfsd4_layoutreturn *lrp)
{ … }
#endif
static __be32
nfsd4_decode_sessionid4(struct nfsd4_compoundargs *argp,
struct nfs4_sessionid *sessionid)
{ … }
static __be32
nfsd4_decode_authsys_parms(struct nfsd4_compoundargs *argp,
struct nfsd4_cb_sec *cbs)
{ … }
static __be32
nfsd4_decode_gss_cb_handles4(struct nfsd4_compoundargs *argp,
struct nfsd4_cb_sec *cbs)
{ … }
static __be32
nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_cb_sec *cbs)
{ … }
static __be32
nfsd4_decode_access(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_close(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_commit(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_create(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static inline __be32
nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static inline __be32
nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_link(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_open_to_lock_owner4(struct nfsd4_compoundargs *argp,
struct nfsd4_lock *lock)
{ … }
static __be32
nfsd4_decode_exist_lock_owner4(struct nfsd4_compoundargs *argp,
struct nfsd4_lock *lock)
{ … }
static __be32
nfsd4_decode_locker4(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock)
{ … }
static __be32
nfsd4_decode_lock(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_locku(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_createhow4(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
{ … }
static __be32
nfsd4_decode_openflag4(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
{ … }
static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *share_access, u32 *deleg_want, u32 *deleg_when)
{ … }
static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x)
{ … }
static __be32
nfsd4_decode_open_claim4(struct nfsd4_compoundargs *argp,
struct nfsd4_open *open)
{ … }
static __be32
nfsd4_decode_open(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p)
{ … }
static __be32
nfsd4_decode_read(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_remove(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_rename(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_renew(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_verify(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_write(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_state_protect_ops(struct nfsd4_compoundargs *argp,
struct nfsd4_exchange_id *exid)
{ … }
static noinline __be32
nfsd4_decode_ssv_sp_parms(struct nfsd4_compoundargs *argp,
struct nfsd4_exchange_id *exid)
{ … }
static __be32
nfsd4_decode_state_protect4_a(struct nfsd4_compoundargs *argp,
struct nfsd4_exchange_id *exid)
{ … }
static __be32
nfsd4_decode_nfs_impl_id4(struct nfsd4_compoundargs *argp,
struct nfsd4_exchange_id *exid)
{ … }
static __be32
nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_channel_attrs4(struct nfsd4_compoundargs *argp,
struct nfsd4_channel_attrs *ca)
{ … }
static __be32
nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_get_dir_delegation(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
#ifdef CONFIG_NFSD_PNFS
static __be32
nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
#endif
static __be32 nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_decode_nl4_server(struct nfsd4_compoundargs *argp,
struct nl4_server *ns)
{ … }
static __be32
nfsd4_decode_copy(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_copy_notify(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_offload_status(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_seek(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_clone(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_vbuf_from_vector(struct nfsd4_compoundargs *argp, struct xdr_buf *xdr,
char **bufp, size_t buflen)
{ … }
static __be32
nfsd4_decode_xattr_name(struct nfsd4_compoundargs *argp, char **namep)
{ … }
static __be32
nfsd4_decode_getxattr(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_setxattr(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_removexattr(struct nfsd4_compoundargs *argp,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_decode_noop(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p)
{ … }
static __be32
nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p)
{ … }
nfsd4_dec;
static const nfsd4_dec nfsd4_dec_ops[] = …;
static inline bool
nfsd4_opnum_in_range(struct nfsd4_compoundargs *argp, struct nfsd4_op *op)
{ … }
static bool
nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
{ … }
static __be32 nfsd4_encode_nfs_fh4(struct xdr_stream *xdr,
struct knfsd_fh *fh_handle)
{ … }
static __be32 nfsd4_encode_nfstime4(struct xdr_stream *xdr,
const struct timespec64 *tv)
{ … }
static __be32 nfsd4_encode_specdata4(struct xdr_stream *xdr,
unsigned int major, unsigned int minor)
{ … }
static __be32
nfsd4_encode_change_info4(struct xdr_stream *xdr, const struct nfsd4_change_info *c)
{ … }
static __be32 nfsd4_encode_netaddr4(struct xdr_stream *xdr,
const struct nfs42_netaddr *addr)
{ … }
static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
char *components, char esc_enter,
char esc_exit)
{ … }
static __be32 nfsd4_encode_components(struct xdr_stream *xdr, char sep,
char *components)
{ … }
static __be32 nfsd4_encode_fs_location4(struct xdr_stream *xdr,
struct nfsd4_fs_location *location)
{ … }
static __be32 nfsd4_encode_pathname4(struct xdr_stream *xdr,
const struct path *root,
const struct path *path)
{ … }
static __be32 nfsd4_encode_fs_locations4(struct xdr_stream *xdr,
struct svc_rqst *rqstp,
struct svc_export *exp)
{ … }
static __be32 nfsd4_encode_nfsace4(struct xdr_stream *xdr, struct svc_rqst *rqstp,
struct nfs4_ace *ace)
{ … }
#define WORD0_ABSENT_FS_ATTRS …
#define WORD1_ABSENT_FS_ATTRS …
#define WORD2_ABSENT_FS_ATTRS …
#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
static inline __be32
nfsd4_encode_security_label(struct xdr_stream *xdr, struct svc_rqst *rqstp,
void *context, int len)
{ … }
#else
static inline __be32
nfsd4_encode_security_label(struct xdr_stream *xdr, struct svc_rqst *rqstp,
void *context, int len)
{ return 0; }
#endif
static __be32 fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *bmval2, u32 *rdattr_err)
{ … }
static int nfsd4_get_mounted_on_ino(struct svc_export *exp, u64 *pino)
{ … }
static __be32
nfsd4_encode_bitmap4(struct xdr_stream *xdr, u32 bmval0, u32 bmval1, u32 bmval2)
{ … }
struct nfsd4_fattr_args { … };
nfsd4_enc_attr;
static __be32 nfsd4_encode_fattr4__noop(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4__true(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4__false(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_supported_attrs(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_type(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_fh_expire_type(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_change(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_size(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_fsid(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_lease_time(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_rdattr_error(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_aclsupport(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_acl(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_filehandle(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_fileid(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_files_avail(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_files_free(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_files_total(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_fs_locations(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_maxfilesize(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_maxlink(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_maxname(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_maxread(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_maxwrite(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_mode(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_numlinks(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_owner(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_owner_group(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_rawdev(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_space_avail(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_space_free(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_space_total(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_space_used(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_time_access(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_time_create(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_time_delta(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_time_metadata(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_time_modify(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_mounted_on_fileid(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
#ifdef CONFIG_NFSD_PNFS
static __be32 nfsd4_encode_fattr4_fs_layout_types(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_layout_types(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static __be32 nfsd4_encode_fattr4_layout_blksize(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
#endif
static __be32 nfsd4_encode_fattr4_suppattr_exclcreat(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
static __be32 nfsd4_encode_fattr4_sec_label(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
#endif
static __be32 nfsd4_encode_fattr4_xattr_support(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{ … }
static const nfsd4_enc_attr nfsd4_enc_fattr4_encode_ops[] = …;
static __be32
nfsd4_encode_fattr4(struct svc_rqst *rqstp, struct xdr_stream *xdr,
struct svc_fh *fhp, struct svc_export *exp,
struct dentry *dentry, const u32 *bmval,
int ignore_crossmnt)
{ … }
static void svcxdr_init_encode_from_buffer(struct xdr_stream *xdr,
struct xdr_buf *buf, __be32 *p, int bytes)
{ … }
__be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
struct svc_fh *fhp, struct svc_export *exp,
struct dentry *dentry, u32 *bmval,
struct svc_rqst *rqstp, int ignore_crossmnt)
{ … }
static void nfsd4_encode_entry4_nfs_cookie4(const struct nfsd4_readdir *readdir,
u64 offset)
{ … }
static inline int attributes_need_mount(u32 *bmval)
{ … }
static __be32
nfsd4_encode_entry4_fattr(struct nfsd4_readdir *cd, const char *name,
int namlen)
{ … }
static __be32
nfsd4_encode_entry4_rdattr_error(struct xdr_stream *xdr, __be32 nfserr)
{ … }
static int
nfsd4_encode_entry4(void *ccdv, const char *name, int namlen,
loff_t offset, u64 ino, unsigned int d_type)
{ … }
static __be32
nfsd4_encode_verifier4(struct xdr_stream *xdr, const nfs4_verifier *verf)
{ … }
static __be32
nfsd4_encode_clientid4(struct xdr_stream *xdr, const clientid_t *clientid)
{ … }
static __be32
nfsd4_encode_stateid4(struct xdr_stream *xdr, const stateid_t *sid)
{ … }
static __be32
nfsd4_encode_sessionid4(struct xdr_stream *xdr,
const struct nfs4_sessionid *sessionid)
{ … }
static __be32
nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_close(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_create(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_getfh(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_lock_owner4(struct xdr_stream *xdr, const clientid_t *clientid,
const struct xdr_netobj *owner)
{ … }
static __be32
nfsd4_encode_lock4denied(struct xdr_stream *xdr,
const struct nfsd4_lock_denied *ld)
{ … }
static __be32
nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_lockt(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_locku(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_link(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_open_nfsace4(struct xdr_stream *xdr)
{ … }
static __be32
nfsd4_encode_open_read_delegation4(struct xdr_stream *xdr, struct nfsd4_open *open)
{ … }
static __be32
nfsd4_encode_nfs_space_limit4(struct xdr_stream *xdr, u64 filesize)
{ … }
static __be32
nfsd4_encode_open_write_delegation4(struct xdr_stream *xdr,
struct nfsd4_open *open)
{ … }
static __be32
nfsd4_encode_open_none_delegation4(struct xdr_stream *xdr,
struct nfsd4_open *open)
{ … }
static __be32
nfsd4_encode_open_delegation4(struct xdr_stream *xdr, struct nfsd4_open *open)
{ … }
static __be32
nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_encode_splice_read(
struct nfsd4_compoundres *resp,
struct nfsd4_read *read,
struct file *file, unsigned long maxcount)
{ … }
static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp,
struct nfsd4_read *read,
struct file *file, unsigned long maxcount)
{ … }
static __be32
nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32 nfsd4_encode_dirlist4(struct xdr_stream *xdr,
struct nfsd4_readdir *readdir,
u32 max_payload)
{ … }
static __be32
nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_remove(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_rpcsec_gss_info(struct xdr_stream *xdr,
struct rpcsec_gss_info *info)
{ … }
static __be32
nfsd4_do_encode_secinfo(struct xdr_stream *xdr, struct svc_export *exp)
{ … }
static __be32
nfsd4_encode_secinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_secinfo_no_name(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_setattr(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_write(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_state_protect_ops4(struct xdr_stream *xdr,
struct nfsd4_exchange_id *exid)
{ … }
static __be32
nfsd4_encode_state_protect4_r(struct xdr_stream *xdr, struct nfsd4_exchange_id *exid)
{ … }
static __be32
nfsd4_encode_server_owner4(struct xdr_stream *xdr, struct svc_rqst *rqstp)
{ … }
static __be32
nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_channel_attrs4(struct xdr_stream *xdr,
const struct nfsd4_channel_attrs *attrs)
{ … }
static __be32
nfsd4_encode_create_session(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_sequence(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_get_dir_delegation(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
#ifdef CONFIG_NFSD_PNFS
static __be32
nfsd4_encode_device_addr4(struct xdr_stream *xdr,
const struct nfsd4_getdeviceinfo *gdev)
{ … }
static __be32
nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_layout4(struct xdr_stream *xdr, const struct nfsd4_layoutget *lgp)
{ … }
static __be32
nfsd4_encode_layoutget(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
#endif
static __be32
nfsd4_encode_write_response4(struct xdr_stream *xdr,
const struct nfsd4_copy *copy)
{ … }
static __be32 nfsd4_encode_copy_requirements4(struct xdr_stream *xdr,
const struct nfsd4_copy *copy)
{ … }
static __be32
nfsd4_encode_copy(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_netloc4(struct xdr_stream *xdr, const struct nl4_server *ns)
{ … }
static __be32
nfsd4_encode_copy_notify(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_offload_status(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_read_plus_data(struct nfsd4_compoundres *resp,
struct nfsd4_read *read)
{ … }
static __be32
nfsd4_encode_read_plus(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_seek(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_noop(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *p)
{ … }
static __be32
nfsd4_vbuf_to_stream(struct xdr_stream *xdr, char *buf, u32 buflen)
{ … }
static __be32
nfsd4_encode_getxattr(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_setxattr(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_listxattr_validate_cookie(struct nfsd4_listxattrs *listxattrs,
u32 *offsetp)
{ … }
static __be32
nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
static __be32
nfsd4_encode_removexattr(struct nfsd4_compoundres *resp, __be32 nfserr,
union nfsd4_op_u *u)
{ … }
nfsd4_enc;
static const nfsd4_enc nfsd4_enc_ops[] = …;
__be32 nfsd4_check_resp_size(struct nfsd4_compoundres *resp, u32 respsize)
{ … }
void
nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op)
{ … }
void nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op)
{ … }
void nfsd4_release_compoundargs(struct svc_rqst *rqstp)
{ … }
bool
nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
{ … }
bool
nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
{ … }