summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e7e8ff3)
SCCS-vsn: sys/miscfs/union/union_vnops.c 8.7
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)union_vnops.c 8.6 (Berkeley) %G%
+ * @(#)union_vnops.c 8.7 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
-union_lookup1(udvp, dvp, vpp, cnp)
+union_lookup1(udvp, dvpp, vpp, cnp)
struct vnode **vpp;
struct componentname *cnp;
{
int error;
struct vnode *tdvp;
struct vnode **vpp;
struct componentname *cnp;
{
int error;
struct vnode *tdvp;
/*
* If stepping up the directory tree, check for going
* back across the mount point, in which case do what
/*
* If stepping up the directory tree, check for going
* back across the mount point, in which case do what
* hierarchy.
*/
if (cnp->cn_flags & ISDOTDOT) {
* hierarchy.
*/
if (cnp->cn_flags & ISDOTDOT) {
+ while ((dvp != udvp) && (dvp->v_flag & VROOT)) {
/*
* Don't do the NOCROSSMOUNT check
* at this level. By definition,
* union fs deals with namespaces, not
* filesystems.
*/
/*
* Don't do the NOCROSSMOUNT check
* at this level. By definition,
* union fs deals with namespaces, not
* filesystems.
*/
- if ((dvp->v_flag & VROOT) == 0)
- break;
-
- dvp = dvp->v_mount->mnt_vnodecovered;
+ *dvpp = dvp = dvp->v_mount->mnt_vnodecovered;
vput(tdvp);
VREF(dvp);
VOP_LOCK(dvp);
vput(tdvp);
VREF(dvp);
VOP_LOCK(dvp);
*/
if (upperdvp) {
FIXUP(dun);
*/
if (upperdvp) {
FIXUP(dun);
- uerror = union_lookup1(um->um_uppervp, upperdvp,
+ uerror = union_lookup1(um->um_uppervp, &upperdvp,
&uppervp, cnp);
/*if (uppervp == upperdvp)
dun->un_flags |= UN_KLOCK;*/
&uppervp, cnp);
/*if (uppervp == upperdvp)
dun->un_flags |= UN_KLOCK;*/
saved_cred = cnp->cn_cred;
cnp->cn_cred = um->um_cred;
}
saved_cred = cnp->cn_cred;
cnp->cn_cred = um->um_cred;
}
- lerror = union_lookup1(um->um_lowervp, lowerdvp,
+ lerror = union_lookup1(um->um_lowervp, &lowerdvp,
&lowervp, cnp);
if (um->um_op == UNMNT_BELOW)
cnp->cn_cred = saved_cred;
&lowervp, cnp);
if (um->um_op == UNMNT_BELOW)
cnp->cn_cred = saved_cred;