Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 2008 13:41:15 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185335 - head/sys/fs/nullfs
Message-ID:  <200811261341.mAQDfF3d056909@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Nov 26 13:41:15 2008
New Revision: 185335
URL: http://svn.freebsd.org/changeset/base/185335

Log:
  In null_lookup(), do the needed cleanup instead of panicing saying
  the cleanup is needed.
  
  Reported by:	kris, pho
  Tested by:	pho
  MFC after:	2 weeks

Modified:
  head/sys/fs/nullfs/null_vnops.c

Modified: head/sys/fs/nullfs/null_vnops.c
==============================================================================
--- head/sys/fs/nullfs/null_vnops.c	Wed Nov 26 13:09:45 2008	(r185334)
+++ head/sys/fs/nullfs/null_vnops.c	Wed Nov 26 13:41:15 2008	(r185335)
@@ -365,11 +365,10 @@ null_lookup(struct vop_lookup_args *ap)
 			vrele(lvp);
 		} else {
 			error = null_nodeget(dvp->v_mount, lvp, &vp);
-			if (error) {
-				/* XXX Cleanup needed... */
-				panic("null_nodeget failed");
-			}
-			*ap->a_vpp = vp;
+			if (error)
+				vput(lvp);
+			else
+				*ap->a_vpp = vp;
 		}
 	}
 	return (error);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811261341.mAQDfF3d056909>