Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2017 12:07:04 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r317406 - stable/10/sys/fs/nfsclient
Message-ID:  <201704251207.v3PC74fr057927@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Tue Apr 25 12:07:04 2017
New Revision: 317406
URL: https://svnweb.freebsd.org/changeset/base/317406

Log:
  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.

Modified:
  stable/10/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clrpcops.c	Tue Apr 25 11:59:23 2017	(r317405)
+++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c	Tue Apr 25 12:07:04 2017	(r317406)
@@ -1187,7 +1187,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704251207.v3PC74fr057927>