Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2008 18:54:44 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184650 - head/sys/fs/unionfs
Message-ID:  <200811041854.mA4IsiuL004838@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Nov  4 18:54:44 2008
New Revision: 184650
URL: http://svn.freebsd.org/changeset/base/184650

Log:
  Don't pass WANTPARENT to the pathname lookup of the mount point for a
  unionfs mount just so we can immediately drop the reference on the parent
  directory vnode without using it.

Modified:
  head/sys/fs/unionfs/union_vfsops.c

Modified: head/sys/fs/unionfs/union_vfsops.c
==============================================================================
--- head/sys/fs/unionfs/union_vfsops.c	Tue Nov  4 18:53:33 2008	(r184649)
+++ head/sys/fs/unionfs/union_vfsops.c	Tue Nov  4 18:54:44 2008	(r184650)
@@ -268,7 +268,7 @@ unionfs_domount(struct mount *mp, struct
 	/*
 	 * Find upper node
 	 */
-	NDINIT(ndp, LOOKUP, FOLLOW | WANTPARENT | LOCKLEAF, UIO_SYSSPACE, target, td);
+	NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, target, td);
 	if ((error = namei(ndp)))
 		return (error);
 
@@ -278,9 +278,6 @@ unionfs_domount(struct mount *mp, struct
 	lowerrootvp = mp->mnt_vnodecovered;
 	upperrootvp = ndp->ni_vp;
 
-	vrele(ndp->ni_dvp);
-	ndp->ni_dvp = NULLVP;
-
 	/* create unionfs_mount */
 	ump = (struct unionfs_mount *)malloc(sizeof(struct unionfs_mount),
 	    M_UNIONFSMNT, M_WAITOK | M_ZERO);



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