Author: rmacklem
Date: Mon May 15 13:14:13 2017
New Revision: 318287
URL: https://svnweb.freebsd.org/changeset/base/318287

Log:
  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.
  
  MFC after:    1 week

Modified:
  head/sys/fs/nfsclient/nfs_clcomsubs.c

Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clcomsubs.c       Mon May 15 13:05:02 2017        
(r318286)
+++ head/sys/fs/nfsclient/nfs_clcomsubs.c       Mon May 15 13:14:13 2017        
(r318287)
@@ -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) {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to