summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2017-04-25 12:07:04 +0000
committerrmacklem <rmacklem@FreeBSD.org>2017-04-25 12:07:04 +0000
commitb31d5402165086cfa8d6eb12cc6748626d2dd66a (patch)
tree8325960ac516f4f2b823c201bb480c4a2e384fab /sys/fs
parent2d266130827322bcf0294089f3cce89e1200294f (diff)
downloadFreeBSD-src-b31d5402165086cfa8d6eb12cc6748626d2dd66a.zip
FreeBSD-src-b31d5402165086cfa8d6eb12cc6748626d2dd66a.tar.gz
MFC: r316655
Fix parsing failure for NFSv4 Setattr operation for failed case. If an operation that preceeds a Setattr in an NFSv4 compound fails, there is no bitmap of attributes to parse. Without this patch, the parsing would fail and return EBADRPC instead of the correct failure error. This could break recovery from a server crash/reboot.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index 0950b06..d1949d8 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -1187,7 +1187,7 @@ nfsrpc_setattrrpc(vnode_t vp, struct vattr *vap,
return (error);
if (nd->nd_flag & (ND_NFSV3 | ND_NFSV4))
error = nfscl_wcc_data(nd, vp, rnap, attrflagp, NULL, stuff);
- if ((nd->nd_flag & ND_NFSV4) && !error)
+ if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == ND_NFSV4 && !error)
error = nfsrv_getattrbits(nd, &attrbits, NULL, NULL);
if (!(nd->nd_flag & ND_NFSV3) && !nd->nd_repstat && !error)
error = nfscl_postop_attr(nd, rnap, attrflagp, stuff);
OpenPOWER on IntegriCloud