summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-03-07 02:39:29 +0100
committerJ. Bruce Fields <bfields@redhat.com>2014-05-27 17:09:08 +0200
commit07d1f8020738ba3180ea9992c4fa7dbc0685396a (patch)
tree3c400bbbe4c453f6b1d5afddf3d7bfae77e81daa /fs/nfsd/xdr4.h
parentnfsd4: reserve head space for krb5 integ/priv info (diff)
downloadlinux-07d1f8020738ba3180ea9992c4fa7dbc0685396a.tar.xz
linux-07d1f8020738ba3180ea9992c4fa7dbc0685396a.zip
nfsd4: fix encoding of out-of-space replies
If nfsd4_check_resp_size() returns an error then we should really be truncating the reply here, otherwise we may leave extra garbage at the end of the rpc reply. Also add a warning to catch any cases where our reply-size estimates may be wrong in the case of a non-idempotent operation. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index f62a055bf63c..15ca47797a82 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -536,6 +536,8 @@ static inline bool nfsd4_last_compound_op(struct svc_rqst *rqstp)
return argp->opcnt == resp->opcnt;
}
+void warn_on_nonidempotent_op(struct nfsd4_op *op);
+
#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
static inline void