diff options
author | kensmith <kensmith@FreeBSD.org> | 2008-12-16 04:34:09 +0000 |
---|---|---|
committer | kensmith <kensmith@FreeBSD.org> | 2008-12-16 04:34:09 +0000 |
commit | 7d088b7fca55b78cc190f580557c09afd68ab0b6 (patch) | |
tree | 7437e3e6d0b16e8fc69d6abb523b0ad666aefe09 /sys/nfsserver | |
parent | 9be993627ea1d961eba9275a5cde288bfbd79696 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 9 |
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); |