summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2017-05-22 22:02:06 +0000
committerrmacklem <rmacklem@FreeBSD.org>2017-05-22 22:02:06 +0000
commitb2ecb718005a048d5fd9227ad35bc38dc9641c92 (patch)
treeb6956cc330cbcec1fbebae98f2180785e5b25025 /sys/fs
parentf5baa0d22d1f068438b4c923f6f4ed878b122aeb (diff)
downloadFreeBSD-src-b2ecb718005a048d5fd9227ad35bc38dc9641c92.zip
FreeBSD-src-b2ecb718005a048d5fd9227ad35bc38dc9641c92.tar.gz
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.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsclient/nfs_clcomsubs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c
index 7f3ef52..94378c3 100644
--- a/sys/fs/nfsclient/nfs_clcomsubs.c
+++ b/sys/fs/nfsclient/nfs_clcomsubs.c
@@ -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) {
OpenPOWER on IntegriCloud