SCCS-vsn: sys/miscfs/union/union.h 8.6
SCCS-vsn: sys/miscfs/union/union_subr.c 8.11
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)union.h 8.5 (Berkeley) %G%
+ * @(#)union.h 8.6 (Berkeley) %G%
struct vnode *un_uppervp; /* overlaying object */
struct vnode *un_lowervp; /* underlying object */
struct vnode *un_dirvp; /* Parent dir of uppervp */
struct vnode *un_uppervp; /* overlaying object */
struct vnode *un_lowervp; /* underlying object */
struct vnode *un_dirvp; /* Parent dir of uppervp */
+ struct vnode *un_pvp; /* Parent vnode */
char *un_path; /* saved component name */
int un_hash; /* saved un_path hash value */
int un_openl; /* # of opens on lowervp */
char *un_path; /* saved component name */
int un_hash; /* saved un_path hash value */
int un_openl; /* # of opens on lowervp */
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)union_subr.c 8.10 (Berkeley) %G%
+ * @(#)union_subr.c 8.11 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
union_allocvp(vpp, mp, undvp, dvp, cnp, uppervp, lowervp)
struct vnode **vpp;
struct mount *mp;
union_allocvp(vpp, mp, undvp, dvp, cnp, uppervp, lowervp)
struct vnode **vpp;
struct mount *mp;
+ struct vnode *undvp; /* parent union vnode */
struct vnode *dvp; /* may be null */
struct componentname *cnp; /* may be null */
struct vnode *uppervp; /* may be null */
struct vnode *dvp; /* may be null */
struct componentname *cnp; /* may be null */
struct vnode *uppervp; /* may be null */
un->un_uppersz = VNOVAL;
un->un_lowervp = lowervp;
un->un_lowersz = VNOVAL;
un->un_uppersz = VNOVAL;
un->un_lowervp = lowervp;
un->un_lowersz = VNOVAL;
+ un->un_pvp = undvp;
+ if (undvp != NULLVP)
+ VREF(undvp);
un->un_openl = 0;
un->un_flags = UN_LOCKED;
if (un->un_uppervp)
un->un_openl = 0;
un->un_flags = UN_LOCKED;
if (un->un_uppervp)
LIST_REMOVE(un, un_cache);
}
LIST_REMOVE(un, un_cache);
}
+ if (un->un_pvp != NULLVP)
+ vrele(un->un_pvp);
if (un->un_uppervp != NULLVP)
vrele(un->un_uppervp);
if (un->un_lowervp != NULLVP)
if (un->un_uppervp != NULLVP)
vrele(un->un_uppervp);
if (un->un_lowervp != NULLVP)