summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-10-02 00:59:49 +0200
committerJ. Bruce Fields <bfields@redhat.com>2020-10-02 15:37:42 +0200
commitf0af22101d9072c6488b8d20d6e33338669029fe (patch)
treed0307fde97f60b3b60c6121dd319deec5f4dcf45 /fs/nfsd/xdr.h
parentNFSD: Fix .pc_release method for NFSv2 (diff)
downloadlinux-f0af22101d9072c6488b8d20d6e33338669029fe.tar.xz
linux-f0af22101d9072c6488b8d20d6e33338669029fe.zip
NFSD: Call NFSv2 encoders on error returns
Remove special dispatcher logic for NFSv2 error responses. These are rare to the point of becoming extinct, but all NFS responses have to pay the cost of the extra conditional branches. With this change, the NFSv2 error cases now get proper xdr_ressize_check() calls. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr.h')
-rw-r--r--fs/nfsd/xdr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfsd/xdr.h b/fs/nfsd/xdr.h
index 3d3e16d48268..17221931815f 100644
--- a/fs/nfsd/xdr.h
+++ b/fs/nfsd/xdr.h
@@ -83,26 +83,32 @@ struct nfsd_readdirargs {
};
struct nfsd_attrstat {
+ __be32 status;
struct svc_fh fh;
struct kstat stat;
};
struct nfsd_diropres {
+ __be32 status;
struct svc_fh fh;
struct kstat stat;
};
struct nfsd_readlinkres {
+ __be32 status;
int len;
};
struct nfsd_readres {
+ __be32 status;
struct svc_fh fh;
unsigned long count;
struct kstat stat;
};
struct nfsd_readdirres {
+ __be32 status;
+
int count;
struct readdir_cd common;
@@ -112,6 +118,7 @@ struct nfsd_readdirres {
};
struct nfsd_statfsres {
+ __be32 status;
struct kstatfs stats;
};