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.
This commit is contained in:
parent
b1b3a8653d
commit
7265164f53
@ -268,7 +268,7 @@ unionfs_domount(struct mount *mp, struct thread *td)
|
||||
/*
|
||||
* 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 thread *td)
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user