From 46adb5dcf875bdf66d1b1eacc5d7dfd87d099024 Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Mon, 15 May 2017 13:14:13 +0000 Subject: 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 --- sys/fs/nfsclient/nfs_clcomsubs.c | 1 + 1 file changed, 1 insertion(+) 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) { -- cgit v1.2.3