Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2017 22:10:02 +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: r318685 - stable/10/sys/fs/nfsclient
Message-ID:  <201705222210.v4MMA2xV034569@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon May 22 22:10:02 2017
New Revision: 318685
URL: https://svnweb.freebsd.org/changeset/base/318685

Log:
  MFC: r318287
  Make nfscl_mtofh() return ENXIO when *nfhpp == NULL.
  
  r317272 introduced a case where nfscl_mtofh() could return 0 when
  *nfhpp is NULL. This patch makes it return ENXIO for this case.

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

Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c	Mon May 22 22:02:06 2017	(r318684)
+++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c	Mon May 22 22:10:02 2017	(r318685)
@@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s
 		if (*++tl != 0) {
 			nd->nd_flag |= ND_NOMOREDATA;
 			flag = 0;
+			error = ENXIO;	/* Return ENXIO so *nfhpp isn't used. */
 		}
 	}
 	if (flag) {



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