svn commit: r186165 - head/sys/nfsserver

Ken Smith kensmith at FreeBSD.org
Tue Dec 16 04:34:10 UTC 2008


Author: kensmith
Date: Tue Dec 16 04:34:09 2008
New Revision: 186165
URL: http://svn.freebsd.org/changeset/base/186165

Log:
  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

Modified:
  head/sys/nfsserver/nfs_serv.c

Modified: head/sys/nfsserver/nfs_serv.c
==============================================================================
--- head/sys/nfsserver/nfs_serv.c	Tue Dec 16 03:18:59 2008	(r186164)
+++ head/sys/nfsserver/nfs_serv.c	Tue Dec 16 04:34:09 2008	(r186165)
@@ -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);


More information about the svn-src-all mailing list