union_vnops.c (47cfdb166d16af183216e459e4e48aff9d2beabf) union_vnops.c (87884aad6ee7a01f0d7e9d79c90e6376b34fd820)
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 *

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

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
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 *

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

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
38 * $Id: union_vnops.c,v 1.50 1998/01/22 02:14:59 kato Exp $
38 * $Id: union_vnops.c,v 1.51 1998/02/04 22:32:55 eivind Exp $
39 */
40
41#include "opt_diagnostic.h"
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/proc.h>
46#include <sys/fcntl.h>

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

1082 VREF(vp);
1083 SETKLOCK(un);
1084 vput(ap->a_vp);
1085 CLEARKLOCK(un);
1086
1087 if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc))
1088 cnp->cn_flags |= DOWHITEOUT;
1089 error = VOP_REMOVE(dvp, vp, cnp);
39 */
40
41#include "opt_diagnostic.h"
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/proc.h>
46#include <sys/fcntl.h>

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

1082 VREF(vp);
1083 SETKLOCK(un);
1084 vput(ap->a_vp);
1085 CLEARKLOCK(un);
1086
1087 if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc))
1088 cnp->cn_flags |= DOWHITEOUT;
1089 error = VOP_REMOVE(dvp, vp, cnp);
1090#if 0
1091 /* XXX */
1090 if (!error)
1091 union_removed_upper(un);
1092 if (!error)
1093 union_removed_upper(un);
1094#endif
1092 } else {
1093 FIXUP(dun, p);
1094 error = union_mkwhiteout(
1095 MOUNTTOUNIONMOUNT(UNIONTOV(dun)->v_mount),
1096 dun->un_uppervp, ap->a_cnp, un->un_path);
1097 vput(ap->a_dvp);
1098 vput(ap->a_vp);
1099 }

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

1327 VREF(vp);
1328 SETKLOCK(un);
1329 vput(ap->a_vp);
1330 CLEARKLOCK(un);
1331
1332 if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc))
1333 cnp->cn_flags |= DOWHITEOUT;
1334 error = VOP_RMDIR(dvp, vp, ap->a_cnp);
1095 } else {
1096 FIXUP(dun, p);
1097 error = union_mkwhiteout(
1098 MOUNTTOUNIONMOUNT(UNIONTOV(dun)->v_mount),
1099 dun->un_uppervp, ap->a_cnp, un->un_path);
1100 vput(ap->a_dvp);
1101 vput(ap->a_vp);
1102 }

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

1330 VREF(vp);
1331 SETKLOCK(un);
1332 vput(ap->a_vp);
1333 CLEARKLOCK(un);
1334
1335 if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc))
1336 cnp->cn_flags |= DOWHITEOUT;
1337 error = VOP_RMDIR(dvp, vp, ap->a_cnp);
1338#if 0
1339 /* XXX */
1335 if (!error)
1336 union_removed_upper(un);
1340 if (!error)
1341 union_removed_upper(un);
1342#endif
1337 } else {
1338 FIXUP(dun, p);
1339 error = union_mkwhiteout(
1340 MOUNTTOUNIONMOUNT(UNIONTOV(dun)->v_mount),
1341 dun->un_uppervp, ap->a_cnp, un->un_path);
1342 vput(ap->a_dvp);
1343 vput(ap->a_vp);
1344 }

--- 475 unchanged lines hidden ---
1343 } else {
1344 FIXUP(dun, p);
1345 error = union_mkwhiteout(
1346 MOUNTTOUNIONMOUNT(UNIONTOV(dun)->v_mount),
1347 dun->un_uppervp, ap->a_cnp, un->un_path);
1348 vput(ap->a_dvp);
1349 vput(ap->a_vp);
1350 }

--- 475 unchanged lines hidden ---