linux/fs/nfs/nfs4xdr.c

/*
 *  fs/nfs/nfs4xdr.c
 *
 *  Client-side XDR for NFSv4.
 *
 *  Copyright (c) 2002 The Regents of the University of Michigan.
 *  All rights reserved.
 *
 *  Kendrick Smith <[email protected]>
 *  Andy Adamson   <[email protected]>
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
 *
 *  1. Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *  2. Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *  3. Neither the name of the University nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
 *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 *  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 *  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#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/proc_fs.h>
#include <linux/kdev_t.h>
#include <linux/module.h>
#include <linux/utsname.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/msg_prot.h>
#include <linux/sunrpc/gss_api.h>
#include <linux/nfs.h>
#include <linux/nfs4.h>
#include <linux/nfs_fs.h>

#include "nfs4_fs.h"
#include "nfs4trace.h"
#include "internal.h"
#include "nfs4idmap.h"
#include "nfs4session.h"
#include "pnfs.h"
#include "netns.h"

#define NFSDBG_FACILITY

/* Mapping from NFS error code to "errno" error code. */
#define errno_NFSERR_IO

struct compound_hdr;
static int nfs4_stat_to_errno(int);
static void encode_layoutget(struct xdr_stream *xdr,
			     const struct nfs4_layoutget_args *args,
			     struct compound_hdr *hdr);
static int decode_layoutget(struct xdr_stream *xdr, struct rpc_rqst *req,
			     struct nfs4_layoutget_res *res);

/* NFSv4 COMPOUND tags are only wanted for debugging purposes */
#ifdef DEBUG
#define NFS4_MAXTAGLEN
#else
#define NFS4_MAXTAGLEN
#endif

/* lock,open owner id:
 * we currently use size 2 (u64) out of (NFS4_OPAQUE_LIMIT  >> 2)
 */
#define pagepad_maxsz
#define open_owner_id_maxsz
#define lock_owner_id_maxsz
#define decode_lockowner_maxsz
#define compound_encode_hdr_maxsz
#define compound_decode_hdr_maxsz
#define op_encode_hdr_maxsz
#define op_decode_hdr_maxsz
#define encode_stateid_maxsz
#define decode_stateid_maxsz
#define encode_verifier_maxsz
#define decode_verifier_maxsz
#define encode_putfh_maxsz
#define decode_putfh_maxsz
#define encode_putrootfh_maxsz
#define decode_putrootfh_maxsz
#define encode_getfh_maxsz
#define decode_getfh_maxsz
#define nfs4_fattr_bitmap_maxsz
#define encode_getattr_maxsz
#define nfstime4_maxsz
#define nfs4_name_maxsz
#define nfs4_path_maxsz
#define nfs4_owner_maxsz
#define nfs4_group_maxsz
#ifdef CONFIG_NFS_V4_SECURITY_LABEL
/* PI(4 bytes) + LFS(4 bytes) + 1(for null terminator?) + MAXLABELLEN */
#define nfs4_label_maxsz
#else
#define nfs4_label_maxsz
#endif
/* We support only one layout type per file system */
#define decode_mdsthreshold_maxsz
/* This is based on getfattr, which uses the most attributes: */
#define nfs4_fattr_value_maxsz
#define nfs4_fattr_maxsz
#define decode_getattr_maxsz
#define encode_attrs_maxsz
#define encode_savefh_maxsz
#define decode_savefh_maxsz
#define encode_restorefh_maxsz
#define decode_restorefh_maxsz
#define encode_fsinfo_maxsz
/* The 5 accounts for the PNFS attributes, and assumes that at most three
 * layout types will be returned.
 */
#define decode_fsinfo_maxsz
#define encode_renew_maxsz
#define decode_renew_maxsz
#define encode_setclientid_maxsz
#define decode_setclientid_maxsz
#define encode_setclientid_confirm_maxsz
#define decode_setclientid_confirm_maxsz
#define encode_lookup_maxsz
#define decode_lookup_maxsz
#define encode_lookupp_maxsz
#define decode_lookupp_maxsz
#define encode_share_access_maxsz
#define encode_createmode_maxsz
#define encode_opentype_maxsz
#define encode_claim_null_maxsz
#define encode_open_maxsz
#define decode_space_limit_maxsz
#define decode_ace_maxsz
#define decode_delegation_maxsz
#define decode_change_info_maxsz
#define decode_open_maxsz
#define encode_open_confirm_maxsz
#define decode_open_confirm_maxsz
#define encode_open_downgrade_maxsz
#define decode_open_downgrade_maxsz
#define encode_close_maxsz
#define decode_close_maxsz
#define encode_setattr_maxsz
#define decode_setattr_maxsz
#define encode_delegattr_maxsz
#define decode_delegattr_maxsz
#define encode_read_maxsz
#define decode_read_maxsz
#define encode_readdir_maxsz
#define decode_readdir_maxsz
#define encode_readlink_maxsz
#define decode_readlink_maxsz
#define encode_write_maxsz
#define decode_write_maxsz
#define encode_commit_maxsz
#define decode_commit_maxsz
#define encode_remove_maxsz
#define decode_remove_maxsz
#define encode_rename_maxsz
#define decode_rename_maxsz
#define encode_link_maxsz
#define decode_link_maxsz
#define encode_lockowner_maxsz
#define encode_lock_maxsz
#define decode_lock_denied_maxsz
#define decode_lock_maxsz
#define encode_lockt_maxsz
#define decode_lockt_maxsz
#define encode_locku_maxsz
#define decode_locku_maxsz
#define encode_release_lockowner_maxsz
#define decode_release_lockowner_maxsz
#define encode_access_maxsz
#define decode_access_maxsz
#define encode_symlink_maxsz
#define decode_symlink_maxsz
#define encode_create_maxsz
#define decode_create_maxsz
#define encode_statfs_maxsz
#define decode_statfs_maxsz
#define encode_delegreturn_maxsz
#define decode_delegreturn_maxsz
#define encode_getacl_maxsz
#define decode_getacl_maxsz
#define encode_setacl_maxsz
#define decode_setacl_maxsz
#define encode_fs_locations_maxsz
#define decode_fs_locations_maxsz
#define encode_secinfo_maxsz
#define decode_secinfo_maxsz

#if defined(CONFIG_NFS_V4_1)
#define NFS4_MAX_MACHINE_NAME_LEN
#define IMPL_NAME_LIMIT

#define encode_exchange_id_maxsz
#define decode_exchange_id_maxsz
#define encode_channel_attrs_maxsz
#define decode_channel_attrs_maxsz
#define encode_create_session_maxsz
#define decode_create_session_maxsz
#define encode_bind_conn_to_session_maxsz
#define decode_bind_conn_to_session_maxsz
#define encode_destroy_session_maxsz
#define decode_destroy_session_maxsz
#define encode_destroy_clientid_maxsz
#define decode_destroy_clientid_maxsz
#define encode_sequence_maxsz
#define decode_sequence_maxsz
#define encode_reclaim_complete_maxsz
#define decode_reclaim_complete_maxsz
#define encode_getdeviceinfo_maxsz
#define decode_getdeviceinfo_maxsz
#define encode_layoutget_maxsz
#define decode_layoutget_maxsz
#define encode_layoutcommit_maxsz
				  /* the actual content of layoutupdate4 should
				     be allocated by drivers and spliced in
				     using xdr_write_pages */
#define decode_layoutcommit_maxsz
#define encode_layoutreturn_maxsz
#define decode_layoutreturn_maxsz
#define encode_secinfo_no_name_maxsz
#define decode_secinfo_no_name_maxsz
#define encode_test_stateid_maxsz
#define decode_test_stateid_maxsz
#define encode_free_stateid_maxsz
#define decode_free_stateid_maxsz
#else /* CONFIG_NFS_V4_1 */
#define encode_sequence_maxsz
#define decode_sequence_maxsz
#define encode_layoutreturn_maxsz
#define decode_layoutreturn_maxsz
#define encode_layoutget_maxsz
#define decode_layoutget_maxsz
#endif /* CONFIG_NFS_V4_1 */

#define NFS4_enc_compound_sz
#define NFS4_dec_compound_sz
#define NFS4_enc_read_sz
#define NFS4_dec_read_sz
#define NFS4_enc_readlink_sz
#define NFS4_dec_readlink_sz
#define NFS4_enc_readdir_sz
#define NFS4_dec_readdir_sz
#define NFS4_enc_write_sz
#define NFS4_dec_write_sz
#define NFS4_enc_commit_sz
#define NFS4_dec_commit_sz
#define NFS4_enc_open_sz
#define NFS4_dec_open_sz
#define NFS4_enc_open_confirm_sz
#define NFS4_dec_open_confirm_sz
#define NFS4_enc_open_noattr_sz
#define NFS4_dec_open_noattr_sz
#define NFS4_enc_open_downgrade_sz
#define NFS4_dec_open_downgrade_sz
#define NFS4_enc_close_sz
#define NFS4_dec_close_sz
#define NFS4_enc_setattr_sz
#define NFS4_dec_setattr_sz
#define NFS4_enc_fsinfo_sz
#define NFS4_dec_fsinfo_sz
#define NFS4_enc_renew_sz
#define NFS4_dec_renew_sz
#define NFS4_enc_setclientid_sz
#define NFS4_dec_setclientid_sz
#define NFS4_enc_setclientid_confirm_sz
#define NFS4_dec_setclientid_confirm_sz
#define NFS4_enc_lock_sz
#define NFS4_dec_lock_sz
#define NFS4_enc_lockt_sz
#define NFS4_dec_lockt_sz
#define NFS4_enc_locku_sz
#define NFS4_dec_locku_sz
#define NFS4_enc_release_lockowner_sz
#define NFS4_dec_release_lockowner_sz
#define NFS4_enc_access_sz
#define NFS4_dec_access_sz
#define NFS4_enc_getattr_sz
#define NFS4_dec_getattr_sz
#define NFS4_enc_lookup_sz
#define NFS4_dec_lookup_sz
#define NFS4_enc_lookupp_sz
#define NFS4_dec_lookupp_sz
#define NFS4_enc_lookup_root_sz
#define NFS4_dec_lookup_root_sz
#define NFS4_enc_remove_sz
#define NFS4_dec_remove_sz
#define NFS4_enc_rename_sz
#define NFS4_dec_rename_sz
#define NFS4_enc_link_sz
#define NFS4_dec_link_sz
#define NFS4_enc_symlink_sz
#define NFS4_dec_symlink_sz
#define NFS4_enc_create_sz
#define NFS4_dec_create_sz
#define NFS4_enc_pathconf_sz
#define NFS4_dec_pathconf_sz
#define NFS4_enc_statfs_sz
#define NFS4_dec_statfs_sz
#define NFS4_enc_server_caps_sz
#define NFS4_dec_server_caps_sz
#define NFS4_enc_delegreturn_sz
#define NFS4_dec_delegreturn_sz
#define NFS4_enc_getacl_sz
#define NFS4_dec_getacl_sz
#define NFS4_enc_setacl_sz
#define NFS4_dec_setacl_sz
#define NFS4_enc_fs_locations_sz
#define NFS4_dec_fs_locations_sz
#define NFS4_enc_secinfo_sz
#define NFS4_dec_secinfo_sz
#define NFS4_enc_fsid_present_sz
#define NFS4_dec_fsid_present_sz
#if defined(CONFIG_NFS_V4_1)
#define NFS4_enc_bind_conn_to_session_sz
#define NFS4_dec_bind_conn_to_session_sz
#define NFS4_enc_exchange_id_sz
#define NFS4_dec_exchange_id_sz
#define NFS4_enc_create_session_sz
#define NFS4_dec_create_session_sz
#define NFS4_enc_destroy_session_sz
#define NFS4_dec_destroy_session_sz
#define NFS4_enc_destroy_clientid_sz
#define NFS4_dec_destroy_clientid_sz
#define NFS4_enc_sequence_sz
#define NFS4_dec_sequence_sz
#endif
#define NFS4_enc_get_lease_time_sz
#define NFS4_dec_get_lease_time_sz
#if defined(CONFIG_NFS_V4_1)
#define NFS4_enc_reclaim_complete_sz
#define NFS4_dec_reclaim_complete_sz
#define NFS4_enc_getdeviceinfo_sz
#define NFS4_dec_getdeviceinfo_sz
#define NFS4_enc_layoutget_sz
#define NFS4_dec_layoutget_sz
#define NFS4_enc_layoutcommit_sz
#define NFS4_dec_layoutcommit_sz
#define NFS4_enc_layoutreturn_sz
#define NFS4_dec_layoutreturn_sz
#define NFS4_enc_secinfo_no_name_sz
#define NFS4_dec_secinfo_no_name_sz
#define NFS4_enc_test_stateid_sz
#define NFS4_dec_test_stateid_sz
#define NFS4_enc_free_stateid_sz
#define NFS4_dec_free_stateid_sz

const u32 nfs41_maxwrite_overhead =;

const u32 nfs41_maxread_overhead =;

const u32 nfs41_maxgetdevinfo_overhead =;
EXPORT_SYMBOL_GPL();
#endif /* CONFIG_NFS_V4_1 */

static const umode_t nfs_type2fmt[] =;

struct compound_hdr {};

static __be32 *reserve_space(struct xdr_stream *xdr, size_t nbytes)
{}

static void encode_opaque_fixed(struct xdr_stream *xdr, const void *buf, size_t len)
{}

static void encode_string(struct xdr_stream *xdr, unsigned int len, const char *str)
{}

static void encode_uint32(struct xdr_stream *xdr, u32 n)
{}

static void encode_uint64(struct xdr_stream *xdr, u64 n)
{}

static ssize_t xdr_encode_bitmap4(struct xdr_stream *xdr,
		const __u32 *bitmap, size_t len)
{}

static size_t mask_bitmap4(const __u32 *bitmap, const __u32 *mask,
		__u32 *res, size_t len)
{}

static void encode_nfs4_seqid(struct xdr_stream *xdr,
		const struct nfs_seqid *seqid)
{}

static void encode_compound_hdr(struct xdr_stream *xdr,
				struct rpc_rqst *req,
				struct compound_hdr *hdr)
{}

static void encode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 op,
		uint32_t replen,
		struct compound_hdr *hdr)
{}

static void encode_nops(struct compound_hdr *hdr)
{}

static void encode_nfs4_stateid(struct xdr_stream *xdr,
				const nfs4_stateid *stateid)
{}

static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf)
{}

static __be32 *
xdr_encode_nfstime4(__be32 *p, const struct timespec64 *t)
{}

static void encode_attrs(struct xdr_stream *xdr, const struct iattr *iap,
				const struct nfs4_label *label,
				const umode_t *umask,
				const struct nfs_server *server,
				const uint32_t attrmask[])
{}

static void encode_access(struct xdr_stream *xdr, u32 access, struct compound_hdr *hdr)
{}

static void encode_close(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
{}

static void encode_commit(struct xdr_stream *xdr, const struct nfs_commitargs *args, struct compound_hdr *hdr)
{}

static void encode_create(struct xdr_stream *xdr, const struct nfs4_create_arg *create, struct compound_hdr *hdr)
{}

static void encode_getattr(struct xdr_stream *xdr,
		const __u32 *bitmap, const __u32 *mask, size_t len,
		struct compound_hdr *hdr)
{}

static void encode_getfattr(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
{}

static void encode_getfattr_open(struct xdr_stream *xdr, const u32 *bitmask,
				 const u32 *open_bitmap,
				 struct compound_hdr *hdr)
{}

static void encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
{}

static void encode_fs_locations(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
{}

static void encode_getfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{}

static void encode_link(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{}

static inline int nfs4_lock_type(struct file_lock *fl, int block)
{}

static inline uint64_t nfs4_lock_length(struct file_lock *fl)
{}

static void encode_lockowner(struct xdr_stream *xdr, const struct nfs_lowner *lowner)
{}

/*
 * opcode,type,reclaim,offset,length,new_lock_owner = 32
 * open_seqid,open_stateid,lock_seqid,lock_owner.clientid, lock_owner.id = 40
 */
static void encode_lock(struct xdr_stream *xdr, const struct nfs_lock_args *args, struct compound_hdr *hdr)
{}

static void encode_lockt(struct xdr_stream *xdr, const struct nfs_lockt_args *args, struct compound_hdr *hdr)
{}

static void encode_locku(struct xdr_stream *xdr, const struct nfs_locku_args *args, struct compound_hdr *hdr)
{}

static void encode_release_lockowner(struct xdr_stream *xdr, const struct nfs_lowner *lowner, struct compound_hdr *hdr)
{}

static void encode_lookup(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{}

static void encode_lookupp(struct xdr_stream *xdr, struct compound_hdr *hdr)
{}

static void encode_share_access(struct xdr_stream *xdr, u32 share_access)
{}

static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_openargs *arg)
{}

static inline void encode_createmode(struct xdr_stream *xdr, const struct nfs_openargs *arg)
{}

static void encode_opentype(struct xdr_stream *xdr, const struct nfs_openargs *arg)
{}

static inline void encode_delegation_type(struct xdr_stream *xdr, u32 delegation_type)
{}

static inline void encode_claim_null(struct xdr_stream *xdr, const struct qstr *name)
{}

static inline void encode_claim_previous(struct xdr_stream *xdr, u32 type)
{}

static inline void encode_claim_delegate_cur(struct xdr_stream *xdr, const struct qstr *name, const nfs4_stateid *stateid)
{}

static inline void encode_claim_fh(struct xdr_stream *xdr)
{}

static inline void encode_claim_delegate_cur_fh(struct xdr_stream *xdr, const nfs4_stateid *stateid)
{}

static void encode_open(struct xdr_stream *xdr, const struct nfs_openargs *arg, struct compound_hdr *hdr)
{}

static void encode_open_confirm(struct xdr_stream *xdr, const struct nfs_open_confirmargs *arg, struct compound_hdr *hdr)
{}

static void encode_open_downgrade(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
{}

static void
encode_putfh(struct xdr_stream *xdr, const struct nfs_fh *fh, struct compound_hdr *hdr)
{}

static void encode_putrootfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{}

static void encode_read(struct xdr_stream *xdr, const struct nfs_pgio_args *args,
			struct compound_hdr *hdr)
{}

static void encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg *readdir, struct rpc_rqst *req, struct compound_hdr *hdr)
{}

static void encode_readlink(struct xdr_stream *xdr, const struct nfs4_readlink *readlink, struct rpc_rqst *req, struct compound_hdr *hdr)
{}

static void encode_remove(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{}

static void encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, const struct qstr *newname, struct compound_hdr *hdr)
{}

static void encode_renew(struct xdr_stream *xdr, clientid4 clid,
			 struct compound_hdr *hdr)
{}

static void
encode_restorefh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{}

static void nfs4_acltype_to_bitmap(enum nfs4_acl_type type, __u32 bitmap[2])
{}

static void encode_setacl(struct xdr_stream *xdr,
			  const struct nfs_setaclargs *arg,
			  struct compound_hdr *hdr)
{}

static void
encode_savefh(struct xdr_stream *xdr, struct compound_hdr *hdr)
{}

static void encode_setattr(struct xdr_stream *xdr, const struct nfs_setattrargs *arg, const struct nfs_server *server, struct compound_hdr *hdr)
{}

static void encode_delegattr(struct xdr_stream *xdr,
		const nfs4_stateid *stateid,
		const struct nfs4_delegattr *attr,
		struct compound_hdr *hdr)
{}

static void encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclientid *setclientid, struct compound_hdr *hdr)
{}

static void encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs4_setclientid_res *arg, struct compound_hdr *hdr)
{}

static void encode_write(struct xdr_stream *xdr, const struct nfs_pgio_args *args,
			 struct compound_hdr *hdr)
{}

static void encode_delegreturn(struct xdr_stream *xdr, const nfs4_stateid *stateid, struct compound_hdr *hdr)
{}

static void encode_secinfo(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{}

#if defined(CONFIG_NFS_V4_1)
/* NFSv4.1 operations */
static void encode_bind_conn_to_session(struct xdr_stream *xdr,
				   const struct nfs41_bind_conn_to_session_args *args,
				   struct compound_hdr *hdr)
{}

static void encode_op_map(struct xdr_stream *xdr, const struct nfs4_op_map *op_map)
{}

static void encode_exchange_id(struct xdr_stream *xdr,
			       const struct nfs41_exchange_id_args *args,
			       struct compound_hdr *hdr)
{}

static void encode_create_session(struct xdr_stream *xdr,
				  const struct nfs41_create_session_args *args,
				  struct compound_hdr *hdr)
{}

static void encode_destroy_session(struct xdr_stream *xdr,
				   const struct nfs4_session *session,
				   struct compound_hdr *hdr)
{}

static void encode_destroy_clientid(struct xdr_stream *xdr,
				   uint64_t clientid,
				   struct compound_hdr *hdr)
{}

static void encode_reclaim_complete(struct xdr_stream *xdr,
				    const struct nfs41_reclaim_complete_args *args,
				    struct compound_hdr *hdr)
{}
#endif /* CONFIG_NFS_V4_1 */

static void encode_sequence(struct xdr_stream *xdr,
			    const struct nfs4_sequence_args *args,
			    struct compound_hdr *hdr)
{}

#ifdef CONFIG_NFS_V4_1
static void
encode_getdeviceinfo(struct xdr_stream *xdr,
		     const struct nfs4_getdeviceinfo_args *args,
		     struct compound_hdr *hdr)
{}

static void
encode_layoutget(struct xdr_stream *xdr,
		      const struct nfs4_layoutget_args *args,
		      struct compound_hdr *hdr)
{}

static int
encode_layoutcommit(struct xdr_stream *xdr,
		    struct inode *inode,
		    const struct nfs4_layoutcommit_args *args,
		    struct compound_hdr *hdr)
{}

static void
encode_layoutreturn(struct xdr_stream *xdr,
		    const struct nfs4_layoutreturn_args *args,
		    struct compound_hdr *hdr)
{}

static int
encode_secinfo_no_name(struct xdr_stream *xdr,
		       const struct nfs41_secinfo_no_name_args *args,
		       struct compound_hdr *hdr)
{}

static void encode_test_stateid(struct xdr_stream *xdr,
				const struct nfs41_test_stateid_args *args,
				struct compound_hdr *hdr)
{}

static void encode_free_stateid(struct xdr_stream *xdr,
				const struct nfs41_free_stateid_args *args,
				struct compound_hdr *hdr)
{}
#else
static inline void
encode_layoutreturn(struct xdr_stream *xdr,
		    const struct nfs4_layoutreturn_args *args,
		    struct compound_hdr *hdr)
{
}

static void
encode_layoutget(struct xdr_stream *xdr,
		      const struct nfs4_layoutget_args *args,
		      struct compound_hdr *hdr)
{
}
#endif /* CONFIG_NFS_V4_1 */

/*
 * END OF "GENERIC" ENCODE ROUTINES.
 */

static u32 nfs4_xdr_minorversion(const struct nfs4_sequence_args *args)
{}

/*
 * Encode an ACCESS request
 */
static void nfs4_xdr_enc_access(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Encode LOOKUP request
 */
static void nfs4_xdr_enc_lookup(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Encode LOOKUPP request
 */
static void nfs4_xdr_enc_lookupp(struct rpc_rqst *req, struct xdr_stream *xdr,
		const void *data)
{}

/*
 * Encode LOOKUP_ROOT request
 */
static void nfs4_xdr_enc_lookup_root(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * Encode REMOVE request
 */
static void nfs4_xdr_enc_remove(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Encode RENAME request
 */
static void nfs4_xdr_enc_rename(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Encode LINK request
 */
static void nfs4_xdr_enc_link(struct rpc_rqst *req, struct xdr_stream *xdr,
			      const void *data)
{}

/*
 * Encode CREATE request
 */
static void nfs4_xdr_enc_create(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Encode SYMLINK request
 */
static void nfs4_xdr_enc_symlink(struct rpc_rqst *req, struct xdr_stream *xdr,
				 const void *data)
{}

/*
 * Encode GETATTR request
 */
static void nfs4_xdr_enc_getattr(struct rpc_rqst *req, struct xdr_stream *xdr,
				 const void *data)
{}

/*
 * Encode a CLOSE request
 */
static void nfs4_xdr_enc_close(struct rpc_rqst *req, struct xdr_stream *xdr,
			       const void *data)
{}

/*
 * Encode an OPEN request
 */
static void nfs4_xdr_enc_open(struct rpc_rqst *req, struct xdr_stream *xdr,
			      const void *data)
{}

/*
 * Encode an OPEN_CONFIRM request
 */
static void nfs4_xdr_enc_open_confirm(struct rpc_rqst *req,
				      struct xdr_stream *xdr,
				      const void *data)
{}

/*
 * Encode an OPEN request with no attributes.
 */
static void nfs4_xdr_enc_open_noattr(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * Encode an OPEN_DOWNGRADE request
 */
static void nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req,
					struct xdr_stream *xdr,
					const void *data)
{}

/*
 * Encode a LOCK request
 */
static void nfs4_xdr_enc_lock(struct rpc_rqst *req, struct xdr_stream *xdr,
			      const void *data)
{}

/*
 * Encode a LOCKT request
 */
static void nfs4_xdr_enc_lockt(struct rpc_rqst *req, struct xdr_stream *xdr,
			       const void *data)
{}

/*
 * Encode a LOCKU request
 */
static void nfs4_xdr_enc_locku(struct rpc_rqst *req, struct xdr_stream *xdr,
			       const void *data)
{}

static void nfs4_xdr_enc_release_lockowner(struct rpc_rqst *req,
					   struct xdr_stream *xdr,
					   const void *data)
{}

/*
 * Encode a READLINK request
 */
static void nfs4_xdr_enc_readlink(struct rpc_rqst *req, struct xdr_stream *xdr,
				  const void *data)
{}

/*
 * Encode a READDIR request
 */
static void nfs4_xdr_enc_readdir(struct rpc_rqst *req, struct xdr_stream *xdr,
				 const void *data)
{}

/*
 * Encode a READ request
 */
static void nfs4_xdr_enc_read(struct rpc_rqst *req, struct xdr_stream *xdr,
			      const void *data)
{}

/*
 * Encode an SETATTR request
 */
static void nfs4_xdr_enc_setattr(struct rpc_rqst *req, struct xdr_stream *xdr,
				 const void *data)
{}

/*
 * Encode a GETACL request
 */
static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Encode a WRITE request
 */
static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
			       const void *data)
{}

/*
 *  a COMMIT request
 */
static void nfs4_xdr_enc_commit(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * FSINFO request
 */
static void nfs4_xdr_enc_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * a PATHCONF request
 */
static void nfs4_xdr_enc_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
				  const void *data)
{}

/*
 * a STATFS request
 */
static void nfs4_xdr_enc_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * GETATTR_BITMAP request
 */
static void nfs4_xdr_enc_server_caps(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * a RENEW request
 */
static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
			       const void *data)

{}

/*
 * a SETCLIENTID request
 */
static void nfs4_xdr_enc_setclientid(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * a SETCLIENTID_CONFIRM request
 */
static void nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req,
					     struct xdr_stream *xdr,
					     const void *data)
{}

/*
 * DELEGRETURN request
 */
static void nfs4_xdr_enc_delegreturn(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * Encode FS_LOCATIONS request
 */
static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req,
				      struct xdr_stream *xdr,
				      const void *data)
{}

/*
 * Encode SECINFO request
 */
static void nfs4_xdr_enc_secinfo(struct rpc_rqst *req,
				struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Encode FSID_PRESENT request
 */
static void nfs4_xdr_enc_fsid_present(struct rpc_rqst *req,
				      struct xdr_stream *xdr,
				      const void *data)
{}

#if defined(CONFIG_NFS_V4_1)
/*
 * BIND_CONN_TO_SESSION request
 */
static void nfs4_xdr_enc_bind_conn_to_session(struct rpc_rqst *req,
				struct xdr_stream *xdr,
				const void *data)
{}

/*
 * EXCHANGE_ID request
 */
static void nfs4_xdr_enc_exchange_id(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}

/*
 * a CREATE_SESSION request
 */
static void nfs4_xdr_enc_create_session(struct rpc_rqst *req,
					struct xdr_stream *xdr,
					const void *data)
{}

/*
 * a DESTROY_SESSION request
 */
static void nfs4_xdr_enc_destroy_session(struct rpc_rqst *req,
					 struct xdr_stream *xdr,
					 const void *data)
{}

/*
 * a DESTROY_CLIENTID request
 */
static void nfs4_xdr_enc_destroy_clientid(struct rpc_rqst *req,
					 struct xdr_stream *xdr,
					 const void *data)
{}

/*
 * a SEQUENCE request
 */
static void nfs4_xdr_enc_sequence(struct rpc_rqst *req, struct xdr_stream *xdr,
				  const void *data)
{}

#endif

/*
 * a GET_LEASE_TIME request
 */
static void nfs4_xdr_enc_get_lease_time(struct rpc_rqst *req,
					struct xdr_stream *xdr,
					const void *data)
{}

#ifdef CONFIG_NFS_V4_1

/*
 * a RECLAIM_COMPLETE request
 */
static void nfs4_xdr_enc_reclaim_complete(struct rpc_rqst *req,
					  struct xdr_stream *xdr,
					  const void *data)
{}

/*
 * Encode GETDEVICEINFO request
 */
static void nfs4_xdr_enc_getdeviceinfo(struct rpc_rqst *req,
				       struct xdr_stream *xdr,
				       const void *data)
{}

/*
 *  Encode LAYOUTGET request
 */
static void nfs4_xdr_enc_layoutget(struct rpc_rqst *req,
				   struct xdr_stream *xdr,
				   const void *data)
{}

/*
 *  Encode LAYOUTCOMMIT request
 */
static void nfs4_xdr_enc_layoutcommit(struct rpc_rqst *req,
				      struct xdr_stream *xdr,
				      const void *priv)
{}

/*
 * Encode LAYOUTRETURN request
 */
static void nfs4_xdr_enc_layoutreturn(struct rpc_rqst *req,
				      struct xdr_stream *xdr,
				      const void *data)
{}

/*
 * Encode SECINFO_NO_NAME request
 */
static void nfs4_xdr_enc_secinfo_no_name(struct rpc_rqst *req,
					struct xdr_stream *xdr,
					const void *data)
{}

/*
 *  Encode TEST_STATEID request
 */
static void nfs4_xdr_enc_test_stateid(struct rpc_rqst *req,
				      struct xdr_stream *xdr,
				      const void *data)
{}

/*
 *  Encode FREE_STATEID request
 */
static void nfs4_xdr_enc_free_stateid(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     const void *data)
{}
#endif /* CONFIG_NFS_V4_1 */

static int decode_opaque_inline(struct xdr_stream *xdr, unsigned int *len, char **string)
{}

static int decode_compound_hdr(struct xdr_stream *xdr, struct compound_hdr *hdr)
{}

static bool __decode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected,
		int *nfs_retval)
{}

static int decode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected)
{}

/* Dummy routine */
static int decode_ace(struct xdr_stream *xdr, void *ace)
{}

static ssize_t
decode_bitmap4(struct xdr_stream *xdr, uint32_t *bitmap, size_t sz)
{}

static int decode_attr_bitmap(struct xdr_stream *xdr, uint32_t *bitmap)
{}

static int decode_attr_length(struct xdr_stream *xdr, uint32_t *attrlen, unsigned int *savep)
{}

static int decode_attr_supported(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *bitmask)
{}

static int decode_attr_type(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *type)
{}

static int decode_attr_fh_expire_type(struct xdr_stream *xdr,
				      uint32_t *bitmap, uint32_t *type)
{}

static int decode_attr_change(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *change)
{}

static int decode_attr_size(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *size)
{}

static int decode_attr_link_support(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_symlink_support(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_fsid(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_fsid *fsid)
{}

static int decode_attr_lease_time(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_error(struct xdr_stream *xdr, uint32_t *bitmap, int32_t *res)
{}

static int decode_attr_exclcreat_supported(struct xdr_stream *xdr,
				 uint32_t *bitmap, uint32_t *bitmask)
{}

static int decode_attr_filehandle(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_fh *fh)
{}

static int decode_attr_aclsupport(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_case_insensitive(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_case_preserving(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *fileid)
{}

static int decode_attr_mounted_on_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *fileid)
{}

static int decode_attr_files_avail(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{}

static int decode_attr_files_free(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{}

static int decode_attr_files_total(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{}

static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path)
{}

static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs4_fs_locations *res)
{}

static int decode_attr_maxfilesize(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{}

static int decode_attr_maxlink(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *maxlink)
{}

static int decode_attr_maxname(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *maxname)
{}

static int decode_attr_maxread(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_maxwrite(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{}

static int decode_attr_mode(struct xdr_stream *xdr, uint32_t *bitmap, umode_t *mode)
{}

static int decode_attr_nlink(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *nlink)
{}

static ssize_t decode_nfs4_string(struct xdr_stream *xdr,
		struct nfs4_string *name, gfp_t gfp_flags)
{}

static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap,
		const struct nfs_server *server, kuid_t *uid,
		struct nfs4_string *owner_name)
{}

static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap,
		const struct nfs_server *server, kgid_t *gid,
		struct nfs4_string *group_name)
{}

static int decode_attr_rdev(struct xdr_stream *xdr, uint32_t *bitmap, dev_t *rdev)
{}

static int decode_attr_space_avail(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{}

static int decode_attr_space_free(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{}

static int decode_attr_space_total(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{}

static int decode_attr_space_used(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *used)
{}

static __be32 *
xdr_decode_nfstime4(__be32 *p, struct timespec64 *t)
{}

static int decode_attr_time(struct xdr_stream *xdr, struct timespec64 *time)
{}

static int decode_attr_time_access(struct xdr_stream *xdr, uint32_t *bitmap, struct timespec64 *time)
{}

static int decode_attr_time_metadata(struct xdr_stream *xdr, uint32_t *bitmap, struct timespec64 *time)
{}

static int decode_attr_time_delta(struct xdr_stream *xdr, uint32_t *bitmap,
				  struct timespec64 *time)
{}

static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
					struct nfs4_label *label)
{}

static int decode_attr_time_modify(struct xdr_stream *xdr, uint32_t *bitmap, struct timespec64 *time)
{}

static int decode_attr_xattrsupport(struct xdr_stream *xdr, uint32_t *bitmap,
				    uint32_t *res)
{}

static int decode_attr_open_arguments(struct xdr_stream *xdr, uint32_t *bitmap,
		struct nfs4_open_caps *res)
{}

static int verify_attr_len(struct xdr_stream *xdr, unsigned int savep, uint32_t attrlen)
{}

static int decode_change_info(struct xdr_stream *xdr, struct nfs4_change_info *cinfo)
{}

static int decode_access(struct xdr_stream *xdr, u32 *supported, u32 *access)
{}

static int decode_opaque_fixed(struct xdr_stream *xdr, void *buf, size_t len)
{}

static int decode_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
{}

static int decode_open_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
{}

static int decode_lock_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
{}

static int decode_delegation_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
{}

static int decode_invalid_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
{}

static int decode_close(struct xdr_stream *xdr, struct nfs_closeres *res)
{}

static int decode_verifier(struct xdr_stream *xdr, void *verifier)
{}

static int decode_write_verifier(struct xdr_stream *xdr, struct nfs_write_verifier *verifier)
{}

static int decode_commit(struct xdr_stream *xdr, struct nfs_commitres *res)
{}

static int decode_create(struct xdr_stream *xdr, struct nfs4_change_info *cinfo)
{}

static int decode_server_caps(struct xdr_stream *xdr, struct nfs4_server_caps_res *res)
{}

static int decode_statfs(struct xdr_stream *xdr, struct nfs_fsstat *fsstat)
{}

static int decode_pathconf(struct xdr_stream *xdr, struct nfs_pathconf *pathconf)
{}

static int decode_threshold_hint(struct xdr_stream *xdr,
				  uint32_t *bitmap,
				  uint64_t *res,
				  uint32_t hint_bit)
{}

static int decode_first_threshold_item4(struct xdr_stream *xdr,
					struct nfs4_threshold *res)
{}

/*
 * Thresholds on pNFS direct I/O vrs MDS I/O
 */
static int decode_attr_mdsthreshold(struct xdr_stream *xdr,
				    uint32_t *bitmap,
				    struct nfs4_threshold *res)
{}

static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
		struct nfs_fattr *fattr, struct nfs_fh *fh,
		struct nfs4_fs_locations *fs_loc, const struct nfs_server *server)
{}

static int decode_getfattr_generic(struct xdr_stream *xdr, struct nfs_fattr *fattr,
		struct nfs_fh *fh, struct nfs4_fs_locations *fs_loc,
		const struct nfs_server *server)
{}

static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr,
		const struct nfs_server *server)
{}

/*
 * Decode potentially multiple layout types.
 */
static int decode_pnfs_layout_types(struct xdr_stream *xdr,
				    struct nfs_fsinfo *fsinfo)
{}

/*
 * The type of file system exported.
 * Note we must ensure that layouttype is set in any non-error case.
 */
static int decode_attr_pnfstype(struct xdr_stream *xdr, uint32_t *bitmap,
				struct nfs_fsinfo *fsinfo)
{}

/*
 * The prefered block size for layout directed io
 */
static int decode_attr_layout_blksize(struct xdr_stream *xdr, uint32_t *bitmap,
				      uint32_t *res)
{}

/*
 * The granularity of a CLONE operation.
 */
static int decode_attr_clone_blksize(struct xdr_stream *xdr, uint32_t *bitmap,
				     uint32_t *res)
{}

static int decode_attr_change_attr_type(struct xdr_stream *xdr,
					uint32_t *bitmap,
					enum nfs4_change_attr_type *res)
{}

static int decode_fsinfo(struct xdr_stream *xdr, struct nfs_fsinfo *fsinfo)
{}

static int decode_getfh(struct xdr_stream *xdr, struct nfs_fh *fh)
{}

static int decode_link(struct xdr_stream *xdr, struct nfs4_change_info *cinfo)
{}

/*
 * We create the owner, so we know a proper owner.id length is 4.
 */
static int decode_lock_denied (struct xdr_stream *xdr, struct file_lock *fl)
{}

static int decode_lock(struct xdr_stream *xdr, struct nfs_lock_res *res)
{}

static int decode_lockt(struct xdr_stream *xdr, struct nfs_lockt_res *res)
{}

static int decode_locku(struct xdr_stream *xdr, struct nfs_locku_res *res)
{}

static int decode_release_lockowner(struct xdr_stream *xdr)
{}

static int decode_lookup(struct xdr_stream *xdr)
{}

static int decode_lookupp(struct xdr_stream *xdr)
{}

/* This is too sick! */
static int decode_space_limit(struct xdr_stream *xdr,
		unsigned long *pagemod_limit)
{}

static int decode_rw_delegation(struct xdr_stream *xdr,
		struct nfs4_open_delegation *res)
{}

static int decode_no_delegation(struct xdr_stream *xdr,
		struct nfs4_open_delegation *res)
{}

static int decode_delegation(struct xdr_stream *xdr,
		struct nfs4_open_delegation *res)
{}

static int decode_open(struct xdr_stream *xdr, struct nfs_openres *res)
{}

static int decode_open_confirm(struct xdr_stream *xdr, struct nfs_open_confirmres *res)
{}

static int decode_open_downgrade(struct xdr_stream *xdr, struct nfs_closeres *res)
{}

static int decode_putfh(struct xdr_stream *xdr)
{}

static int decode_putrootfh(struct xdr_stream *xdr)
{}

static int decode_read(struct xdr_stream *xdr, struct rpc_rqst *req,
		       struct nfs_pgio_res *res)
{}

static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs4_readdir_res *readdir)
{}

static int decode_readlink(struct xdr_stream *xdr, struct rpc_rqst *req)
{}

static int decode_remove(struct xdr_stream *xdr, struct nfs4_change_info *cinfo)
{}

static int decode_rename(struct xdr_stream *xdr, struct nfs4_change_info *old_cinfo,
	      struct nfs4_change_info *new_cinfo)
{}

static int decode_renew(struct xdr_stream *xdr)
{}

static int
decode_restorefh(struct xdr_stream *xdr)
{}

static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
			 struct nfs_getaclres *res, enum nfs4_acl_type type)
{}

static int
decode_savefh(struct xdr_stream *xdr)
{}

static int decode_setattr(struct xdr_stream *xdr)
{}

static int decode_delegattr(struct xdr_stream *xdr)
{}

static int decode_setclientid(struct xdr_stream *xdr, struct nfs4_setclientid_res *res)
{}

static int decode_setclientid_confirm(struct xdr_stream *xdr)
{}

static int decode_write(struct xdr_stream *xdr, struct nfs_pgio_res *res)
{}

static int decode_delegreturn(struct xdr_stream *xdr)
{}

static int decode_secinfo_gss(struct xdr_stream *xdr,
			      struct nfs4_secinfo4 *flavor)
{}

static int decode_secinfo_common(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
{}

static int decode_secinfo(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
{}

#if defined(CONFIG_NFS_V4_1)
static int decode_secinfo_no_name(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
{}

static int decode_op_map(struct xdr_stream *xdr, struct nfs4_op_map *op_map)
{}

static int decode_exchange_id(struct xdr_stream *xdr,
			      struct nfs41_exchange_id_res *res)
{}

static int decode_chan_attrs(struct xdr_stream *xdr,
			     struct nfs4_channel_attrs *attrs)
{}

static int decode_sessionid(struct xdr_stream *xdr, struct nfs4_sessionid *sid)
{}

static int decode_bind_conn_to_session(struct xdr_stream *xdr,
				struct nfs41_bind_conn_to_session_res *res)
{}

static int decode_create_session(struct xdr_stream *xdr,
				 struct nfs41_create_session_res *res)
{}

static int decode_destroy_session(struct xdr_stream *xdr, void *dummy)
{}

static int decode_destroy_clientid(struct xdr_stream *xdr, void *dummy)
{}

static int decode_reclaim_complete(struct xdr_stream *xdr, void *dummy)
{}
#endif /* CONFIG_NFS_V4_1 */

static int decode_sequence(struct xdr_stream *xdr,
			   struct nfs4_sequence_res *res,
			   struct rpc_rqst *rqstp)
{}

#if defined(CONFIG_NFS_V4_1)
static int decode_layout_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
{}

static int decode_getdeviceinfo(struct xdr_stream *xdr,
				struct nfs4_getdeviceinfo_res *res)
{}

static int decode_layoutget(struct xdr_stream *xdr, struct rpc_rqst *req,
			    struct nfs4_layoutget_res *res)
{}

static int decode_layoutreturn(struct xdr_stream *xdr,
			       struct nfs4_layoutreturn_res *res)
{}

static int decode_layoutcommit(struct xdr_stream *xdr,
			       struct rpc_rqst *req,
			       struct nfs4_layoutcommit_res *res)
{}

static int decode_test_stateid(struct xdr_stream *xdr,
			       struct nfs41_test_stateid_res *res)
{}

static int decode_free_stateid(struct xdr_stream *xdr,
			       struct nfs41_free_stateid_res *res)
{}
#else
static inline
int decode_layoutreturn(struct xdr_stream *xdr,
			       struct nfs4_layoutreturn_res *res)
{
	return 0;
}

static int decode_layoutget(struct xdr_stream *xdr, struct rpc_rqst *req,
			    struct nfs4_layoutget_res *res)
{
	return 0;
}

#endif /* CONFIG_NFS_V4_1 */

/*
 * END OF "GENERIC" DECODE ROUTINES.
 */

/*
 * Decode OPEN_DOWNGRADE response
 */
static int nfs4_xdr_dec_open_downgrade(struct rpc_rqst *rqstp,
				       struct xdr_stream *xdr,
				       void *data)
{}

/*
 * Decode ACCESS response
 */
static int nfs4_xdr_dec_access(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode LOOKUP response
 */
static int nfs4_xdr_dec_lookup(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode LOOKUPP response
 */
static int nfs4_xdr_dec_lookupp(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
		void *data)
{}

/*
 * Decode LOOKUP_ROOT response
 */
static int nfs4_xdr_dec_lookup_root(struct rpc_rqst *rqstp,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode REMOVE response
 */
static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode RENAME response
 */
static int nfs4_xdr_dec_rename(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode LINK response
 */
static int nfs4_xdr_dec_link(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			     void *data)
{}

/*
 * Decode CREATE response
 */
static int nfs4_xdr_dec_create(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode SYMLINK response
 */
static int nfs4_xdr_dec_symlink(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
				void *res)
{}

/*
 * Decode GETATTR response
 */
static int nfs4_xdr_dec_getattr(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
				void *data)
{}

/*
 * Encode an SETACL request
 */
static void nfs4_xdr_enc_setacl(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *data)
{}

/*
 * Decode SETACL response
 */
static int
nfs4_xdr_dec_setacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
		    void *data)
{}

/*
 * Decode GETACL response
 */
static int
nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
		    void *data)
{}

/*
 * Decode CLOSE response
 */
static int nfs4_xdr_dec_close(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			      void *data)
{}

/*
 * Decode OPEN response
 */
static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			     void *data)
{}

/*
 * Decode OPEN_CONFIRM response
 */
static int nfs4_xdr_dec_open_confirm(struct rpc_rqst *rqstp,
				     struct xdr_stream *xdr,
				     void *data)
{}

/*
 * Decode OPEN response
 */
static int nfs4_xdr_dec_open_noattr(struct rpc_rqst *rqstp,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode SETATTR response
 */
static int nfs4_xdr_dec_setattr(struct rpc_rqst *rqstp,
				struct xdr_stream *xdr,
				void *data)
{}

/*
 * Decode LOCK response
 */
static int nfs4_xdr_dec_lock(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			     void *data)
{}

/*
 * Decode LOCKT response
 */
static int nfs4_xdr_dec_lockt(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			      void *data)
{}

/*
 * Decode LOCKU response
 */
static int nfs4_xdr_dec_locku(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			      void *data)
{}

static int nfs4_xdr_dec_release_lockowner(struct rpc_rqst *rqstp,
					  struct xdr_stream *xdr, void *dummy)
{}

/*
 * Decode READLINK response
 */
static int nfs4_xdr_dec_readlink(struct rpc_rqst *rqstp,
				 struct xdr_stream *xdr,
				 void *data)
{}

/*
 * Decode READDIR response
 */
static int nfs4_xdr_dec_readdir(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
				void *data)
{}

/*
 * Decode Read response
 */
static int nfs4_xdr_dec_read(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			     void *data)
{}

/*
 * Decode WRITE response
 */
static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			      void *data)
{}

/*
 * Decode COMMIT response
 */
static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode FSINFO response
 */
static int nfs4_xdr_dec_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode PATHCONF response
 */
static int nfs4_xdr_dec_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
				 void *data)
{}

/*
 * Decode STATFS response
 */
static int nfs4_xdr_dec_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
			       void *data)
{}

/*
 * Decode GETATTR_BITMAP response
 */
static int nfs4_xdr_dec_server_caps(struct rpc_rqst *req,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode RENEW response
 */
static int nfs4_xdr_dec_renew(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
			      void *__unused)
{}

/*
 * Decode SETCLIENTID response
 */
static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode SETCLIENTID_CONFIRM response
 */
static int nfs4_xdr_dec_setclientid_confirm(struct rpc_rqst *req,
					    struct xdr_stream *xdr,
					    void *data)
{}

/*
 * Decode DELEGRETURN response
 */
static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp,
				    struct xdr_stream *xdr,
				    void *data)
{}

/*
 * Decode FS_LOCATIONS response
 */
static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req,
				     struct xdr_stream *xdr,
				     void *data)
{}

/*
 * Decode SECINFO response
 */
static int nfs4_xdr_dec_secinfo(struct rpc_rqst *rqstp,
				struct xdr_stream *xdr,
				void *data)
{}

/*
 * Decode FSID_PRESENT response
 */
static int nfs4_xdr_dec_fsid_present(struct rpc_rqst *rqstp,
				     struct xdr_stream *xdr,
				     void *data)
{}

#if defined(CONFIG_NFS_V4_1)
/*
 * Decode BIND_CONN_TO_SESSION response
 */
static int nfs4_xdr_dec_bind_conn_to_session(struct rpc_rqst *rqstp,
					struct xdr_stream *xdr,
					void *res)
{}

/*
 * Decode EXCHANGE_ID response
 */
static int nfs4_xdr_dec_exchange_id(struct rpc_rqst *rqstp,
				    struct xdr_stream *xdr,
				    void *res)
{}

/*
 * Decode CREATE_SESSION response
 */
static int nfs4_xdr_dec_create_session(struct rpc_rqst *rqstp,
				       struct xdr_stream *xdr,
				       void *res)
{}

/*
 * Decode DESTROY_SESSION response
 */
static int nfs4_xdr_dec_destroy_session(struct rpc_rqst *rqstp,
					struct xdr_stream *xdr,
					void *res)
{}

/*
 * Decode DESTROY_CLIENTID response
 */
static int nfs4_xdr_dec_destroy_clientid(struct rpc_rqst *rqstp,
					struct xdr_stream *xdr,
					void *res)
{}

/*
 * Decode SEQUENCE response
 */
static int nfs4_xdr_dec_sequence(struct rpc_rqst *rqstp,
				 struct xdr_stream *xdr,
				 void *res)
{}

#endif

/*
 * Decode GET_LEASE_TIME response
 */
static int nfs4_xdr_dec_get_lease_time(struct rpc_rqst *rqstp,
				       struct xdr_stream *xdr,
				       void *data)
{}

#ifdef CONFIG_NFS_V4_1

/*
 * Decode RECLAIM_COMPLETE response
 */
static int nfs4_xdr_dec_reclaim_complete(struct rpc_rqst *rqstp,
					 struct xdr_stream *xdr,
					 void *data)
{}

/*
 * Decode GETDEVINFO response
 */
static int nfs4_xdr_dec_getdeviceinfo(struct rpc_rqst *rqstp,
				      struct xdr_stream *xdr,
				      void *data)
{}

/*
 * Decode LAYOUTGET response
 */
static int nfs4_xdr_dec_layoutget(struct rpc_rqst *rqstp,
				  struct xdr_stream *xdr,
				  void *data)
{}

/*
 * Decode LAYOUTRETURN response
 */
static int nfs4_xdr_dec_layoutreturn(struct rpc_rqst *rqstp,
				     struct xdr_stream *xdr,
				     void *data)
{}

/*
 * Decode LAYOUTCOMMIT response
 */
static int nfs4_xdr_dec_layoutcommit(struct rpc_rqst *rqstp,
				     struct xdr_stream *xdr,
				     void *data)
{}

/*
 * Decode SECINFO_NO_NAME response
 */
static int nfs4_xdr_dec_secinfo_no_name(struct rpc_rqst *rqstp,
					struct xdr_stream *xdr,
					void *data)
{}

/*
 * Decode TEST_STATEID response
 */
static int nfs4_xdr_dec_test_stateid(struct rpc_rqst *rqstp,
				     struct xdr_stream *xdr,
				     void *data)
{}

/*
 * Decode FREE_STATEID response
 */
static int nfs4_xdr_dec_free_stateid(struct rpc_rqst *rqstp,
				     struct xdr_stream *xdr,
				     void *data)
{}
#endif /* CONFIG_NFS_V4_1 */

/**
 * nfs4_decode_dirent - Decode a single NFSv4 directory entry stored in
 *                      the local page cache.
 * @xdr: XDR stream where entry resides
 * @entry: buffer to fill in with entry data
 * @plus: boolean indicating whether this should be a readdirplus entry
 *
 * Returns zero if successful, otherwise a negative errno value is
 * returned.
 *
 * This function is not invoked during READDIR reply decoding, but
 * rather whenever an application invokes the getdents(2) system call
 * on a directory already in our cache.
 */
int nfs4_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry,
		       bool plus)
{}

/*
 * We need to translate between nfs status return values and
 * the local errno values which may not be the same.
 */
static struct {} nfs_errtbl[] =;

/*
 * Convert an NFS error code to a local one.
 * This one is used jointly by NFSv2 and NFSv3.
 */
static int
nfs4_stat_to_errno(int stat)
{}

#ifdef CONFIG_NFS_V4_2
#include "nfs42xdr.c"
#endif /* CONFIG_NFS_V4_2 */

#define PROC(proc, argtype, restype)

#define STUB(proc)

#if defined(CONFIG_NFS_V4_1)
#define PROC41(proc, argtype, restype)
#else
#define PROC41
#endif

#if defined(CONFIG_NFS_V4_2)
#define PROC42(proc, argtype, restype)
#else
#define PROC42
#endif

const struct rpc_procinfo nfs4_procedures[] =;

static unsigned int nfs_version4_counts[ARRAY_SIZE(nfs4_procedures)];
const struct rpc_version nfs_version4 =;