From bdcf3e0ae5c8c0e8a2ab58643249c3d382501cbe Mon Sep 17 00:00:00 2001 From: rmacklem Date: Sun, 7 May 2017 22:18:05 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.freebsd.org/base/stable/10@317930 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/fs/nfs/nfs_commonkrpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 1b2449b33..15d7349aa 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1044,8 +1044,10 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, /* * 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; /* -- 2.45.0