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
This commit is contained in:
Rick Macklem 2017-05-15 13:14:13 +00:00
parent 391aba32e6
commit 46adb5dcf8

View File

@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, struct nfsfh **nfhpp,
if (*++tl != 0) {
nd->nd_flag |= ND_NOMOREDATA;
flag = 0;
error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */
}
}
if (flag) {