aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2021-04-08 21:04:22 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2021-04-08 21:04:22 +0000
commit05a39c2c1c18cd0c4382a4f58e0952d3f77e7dfa (patch)
tree73d152b0246d4c9e7f7f151d2ecad1bee0eb4a84 /sys
parent9e5243d7b65939c3d3dbf844616084e9580876dd (diff)
downloadsrc-05a39c2c1c18cd0c4382a4f58e0952d3f77e7dfa.tar.gz
src-05a39c2c1c18cd0c4382a4f58e0952d3f77e7dfa.zip
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdkrpc.c7
-rw-r--r--sys/fs/nfsserver/nfs_nfsdsubs.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdkrpc.c b/sys/fs/nfsserver/nfs_nfsdkrpc.c
index 7265e439d6a0..44f585ff0beb 100644
--- a/sys/fs/nfsserver/nfs_nfsdkrpc.c
+++ b/sys/fs/nfsserver/nfs_nfsdkrpc.c
@@ -410,8 +410,13 @@ nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, SVCXPRT *xprt,
m = NULL;
if ((nd->nd_flag & ND_HASSEQUENCE) != 0)
nfsrv_cache_session(nd, &m);
- if (nd->nd_repstat == NFSERR_REPLYFROMCACHE)
+ if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) {
nd->nd_repstat = 0;
+ if (m != NULL) {
+ m_freem(nd->nd_mreq);
+ nd->nd_mreq = m;
+ }
+ }
cacherep = RC_REPLY;
} else {
if (nd->nd_repstat == NFSERR_DONTREPLY)
diff --git a/sys/fs/nfsserver/nfs_nfsdsubs.c b/sys/fs/nfsserver/nfs_nfsdsubs.c
index ac28119028c4..49c5cac999c7 100644
--- a/sys/fs/nfsserver/nfs_nfsdsubs.c
+++ b/sys/fs/nfsserver/nfs_nfsdsubs.c
@@ -1553,6 +1553,8 @@ nfsd_errmap(struct nfsrv_descript *nd)
else if (nd->nd_repstat == NFSERR_MINORVERMISMATCH ||
nd->nd_repstat == NFSERR_OPILLEGAL)
return (txdr_unsigned(nd->nd_repstat));
+ else if (nd->nd_repstat == NFSERR_REPLYFROMCACHE)
+ return (txdr_unsigned(NFSERR_IO));
else if ((nd->nd_flag & ND_NFSV41) != 0) {
if (nd->nd_repstat == EOPNOTSUPP)
nd->nd_repstat = NFSERR_NOTSUPP;