union_vnops.c (edfe736df916f9ca24d812ba13c52aed1fe8b4da) union_vnops.c (dd8c04f4c7b9354c57ae38ef2822d7ae408c6a62)
1/*
2 * Copyright (c) 1992, 1993, 1994, 1995 Jan-Simon Pendry.
3 * Copyright (c) 1992, 1993, 1994, 1995
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

--- 1608 unchanged lines hidden (view full) ---

1617{
1618 struct union_node *dun = VTOUNION(ap->a_dvp);
1619 struct componentname *cnp = ap->a_cnp;
1620 struct proc *p = cnp->cn_proc;
1621 struct vnode *dvp;
1622 int error = EROFS;
1623
1624 if ((dvp = union_lock_upper(dun, p)) != NULLVP) {
1/*
2 * Copyright (c) 1992, 1993, 1994, 1995 Jan-Simon Pendry.
3 * Copyright (c) 1992, 1993, 1994, 1995
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

--- 1608 unchanged lines hidden (view full) ---

1617{
1618 struct union_node *dun = VTOUNION(ap->a_dvp);
1619 struct componentname *cnp = ap->a_cnp;
1620 struct proc *p = cnp->cn_proc;
1621 struct vnode *dvp;
1622 int error = EROFS;
1623
1624 if ((dvp = union_lock_upper(dun, p)) != NULLVP) {
1625 struct vnode *vp;
1626
1627 error = VOP_SYMLINK(dvp, &vp, cnp, ap->a_vap, ap->a_target);
1628 /* vp is garbage whether an error occurs or not */
1629 *ap->a_vpp = NULLVP;
1625 error = VOP_SYMLINK(dvp, ap->a_vpp, cnp, ap->a_vap,
1626 ap->a_target);
1630 union_unlock_upper(dvp, p);
1631 }
1632 return (error);
1633}
1634
1635/*
1636 * union_readdir works in concert with getdirentries and
1637 * readdir(3) to provide a list of entries in the unioned

--- 389 unchanged lines hidden ---
1627 union_unlock_upper(dvp, p);
1628 }
1629 return (error);
1630}
1631
1632/*
1633 * union_readdir works in concert with getdirentries and
1634 * readdir(3) to provide a list of entries in the unioned

--- 389 unchanged lines hidden ---