svn commit: r316655 - head/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Sun Apr 9 12:32:24 UTC 2017
Author: rmacklem
Date: Sun Apr 9 12:32:22 2017
New Revision: 316655
URL: https://svnweb.freebsd.org/changeset/base/316655
Log:
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.
Tested by: cperciva
PR: 215883
MFC after: 2 weeks
Modified:
head/sys/fs/nfsclient/nfs_clrpcops.c
Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 9 11:16:16 2017 (r316654)
+++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 9 12:32:22 2017 (r316655)
@@ -1190,7 +1190,7 @@ nfsrpc_setattrrpc(vnode_t vp, struct vat
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);
More information about the svn-src-head
mailing list