aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2017-05-15 13:14:13 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2017-05-15 13:14:13 +0000
commit46adb5dcf875bdf66d1b1eacc5d7dfd87d099024 (patch)
tree1f4d35c8775f9d7094af2272b19c7ebf14c15e40
parent391aba32e6d308a8fd0ac12ee49495119c7a307c (diff)
downloadsrc-46adb5dcf875bdf66d1b1eacc5d7dfd87d099024.tar.gz
src-46adb5dcf875bdf66d1b1eacc5d7dfd87d099024.zip
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
Notes
Notes: svn path=/head/; revision=318287
-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 0c6ec2dc4323..c16a3402946d 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) {