Author: rmacklem
Date: Sun May  7 22:18:05 2017
New Revision: 317930
URL: https://svnweb.freebsd.org/changeset/base/317930

Log:
  MFC: r317276
  Don't set ND_NOMOREDATA for a failed Setattr operation (NFSv4).
  
  The NFSv4 Setattr operation always has reply data even when it fails,
  so don't set the ND_NOMOREDATA for it. This would only affect unusual
  cases where Setattr fails and the RPC code wants to parse the rest of
  the compound. Detected during recent development related to the pNFS server.

Modified:
  stable/10/sys/fs/nfs/nfs_commonkrpc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- stable/10/sys/fs/nfs/nfs_commonkrpc.c       Sun May  7 22:10:55 2017        
(r317929)
+++ stable/10/sys/fs/nfs/nfs_commonkrpc.c       Sun May  7 22:18:05 2017        
(r317930)
@@ -1044,8 +1044,10 @@ tryagain:
                        /*
                         * If this op's status is non-zero, mark
                         * that there is no more data to process.
+                        * The exception is Setattr, which always has xdr
+                        * when it has failed.
                         */
-                       if (j)
+                       if (j != 0 && i != NFSV4OP_SETATTR)
                                nd->nd_flag |= ND_NOMOREDATA;
 
                        /*
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to