summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver/nfs_serv.c
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2008-12-16 04:34:09 +0000
committerkensmith <kensmith@FreeBSD.org>2008-12-16 04:34:09 +0000
commit7d088b7fca55b78cc190f580557c09afd68ab0b6 (patch)
tree7437e3e6d0b16e8fc69d6abb523b0ad666aefe09 /sys/nfsserver/nfs_serv.c
parent9be993627ea1d961eba9275a5cde288bfbd79696 (diff)
downloadFreeBSD-src-7d088b7fca55b78cc190f580557c09afd68ab0b6.zip
FreeBSD-src-7d088b7fca55b78cc190f580557c09afd68ab0b6.tar.gz
Handle VFS_VGET() failing with an error other than EOPNOTSUPP in addition
to failing with that error. PR: 125149 Submitted by: Jaakko Heinonen (jh <at> saunalahti <dot> fi) Reviewed by: mohans, kan MFC after: 3 days
Diffstat (limited to 'sys/nfsserver/nfs_serv.c')
-rw-r--r--sys/nfsserver/nfs_serv.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 3b860ac..ab09421 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -3615,9 +3615,12 @@ again:
* Probe one of the directory entries to see if the filesystem
* supports VGET.
*/
- if (VFS_VGET(vp->v_mount, dp->d_fileno, LK_EXCLUSIVE, &nvp) ==
- EOPNOTSUPP) {
- error = NFSERR_NOTSUPP;
+ error = VFS_VGET(vp->v_mount, dp->d_fileno, LK_EXCLUSIVE, &nvp);
+ if (error) {
+ if (error == EOPNOTSUPP)
+ error = NFSERR_NOTSUPP;
+ else
+ error = NFSERR_SERVERFAULT;
vrele(vp);
vp = NULL;
free((caddr_t)cookies, M_TEMP);
OpenPOWER on IntegriCloud