From 40f8ff48009d4982e4f035f9c098b84f0e8974f3 Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Fri, 21 Apr 2017 22:38:26 +0000 Subject: [PATCH] Don't create a backchannel for a DS connection. An NFSv4.1 client connection to a Data Server (DS) should not have a backchannel. This patch fixes the NFSv4.1/pNFS client to not do a backchannel for this case. Found during recent testing with the pNFS server under development. MFC after: 2 weeks --- sys/fs/nfs/nfs_commonkrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 3ae82993349d..a415e59406a6 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -280,7 +280,8 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp, retries = nmp->nm_retry; } else retries = INT_MAX; - if (NFSHASNFSV4N(nmp)) { + /* cred == NULL for DS connects. */ + if (NFSHASNFSV4N(nmp) && cred != NULL) { /* * Make sure the nfscbd_pool doesn't get destroyed * while doing this.