union_subr.c (124e4c3be8dae63a1024352685e1c2b9e64a8312) | union_subr.c (aec0fb7b40e4cf877bea663f2d86dd07c3524fe8) |
---|---|
1/* 2 * Copyright (c) 1994 Jan-Simon Pendry 3 * Copyright (c) 1994 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 * --- 430 unchanged lines hidden (view full) --- 439 * scenario is un being under dvp. 440 */ 441 442 if (dvp && un->un_vnode != dvp) { 443 struct vnode *scan = un->un_vnode; 444 445 do { 446 scan = VTOUNION(scan)->un_pvp; | 1/* 2 * Copyright (c) 1994 Jan-Simon Pendry 3 * Copyright (c) 1994 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 * --- 430 unchanged lines hidden (view full) --- 439 * scenario is un being under dvp. 440 */ 441 442 if (dvp && un->un_vnode != dvp) { 443 struct vnode *scan = un->un_vnode; 444 445 do { 446 scan = VTOUNION(scan)->un_pvp; |
447 } while (scan && scan->v_op == union_vnodeop_p && | 447 } while (scan && scan->v_op == &union_vnodeops && |
448 scan != dvp); 449 if (scan != dvp) { 450 /* 451 * our new un is above dvp (we never saw dvp 452 * while moving up the tree). 453 */ 454 VREF(dvp); 455 VOP_UNLOCK(dvp, 0, td); --- 86 unchanged lines hidden (view full) --- 542 if (union_list_lock(hash)) 543 goto loop; 544 } 545 546 /* 547 * Create new node rather than replace old node. 548 */ 549 | 448 scan != dvp); 449 if (scan != dvp) { 450 /* 451 * our new un is above dvp (we never saw dvp 452 * while moving up the tree). 453 */ 454 VREF(dvp); 455 VOP_UNLOCK(dvp, 0, td); --- 86 unchanged lines hidden (view full) --- 542 if (union_list_lock(hash)) 543 goto loop; 544 } 545 546 /* 547 * Create new node rather than replace old node. 548 */ 549 |
550 error = getnewvnode("union", mp, union_vnodeop_p, vpp); | 550 error = getnewvnode("union", mp, &union_vnodeops, vpp); |
551 if (error) { 552 /* 553 * If an error occurs, clear out vnodes. 554 */ 555 if (lowervp) 556 vrele(lowervp); 557 if (uppervp) 558 vrele(uppervp); --- 642 unchanged lines hidden (view full) --- 1201static void 1202union_dircache_r(vp, vppp, cntp) 1203 struct vnode *vp; 1204 struct vnode ***vppp; 1205 int *cntp; 1206{ 1207 struct union_node *un; 1208 | 551 if (error) { 552 /* 553 * If an error occurs, clear out vnodes. 554 */ 555 if (lowervp) 556 vrele(lowervp); 557 if (uppervp) 558 vrele(uppervp); --- 642 unchanged lines hidden (view full) --- 1201static void 1202union_dircache_r(vp, vppp, cntp) 1203 struct vnode *vp; 1204 struct vnode ***vppp; 1205 int *cntp; 1206{ 1207 struct union_node *un; 1208 |
1209 if (vp->v_op != union_vnodeop_p) { | 1209 if (vp->v_op != &union_vnodeops) { |
1210 if (vppp) { 1211 VREF(vp); 1212 *(*vppp)++ = vp; 1213 if (--(*cntp) == 0) 1214 panic("union: dircache table too small"); 1215 } else { 1216 (*cntp)++; 1217 } --- 87 unchanged lines hidden (view full) --- 1305/* 1306 * Module glue to remove #ifdef UNION from vfs_syscalls.c 1307 */ 1308static int 1309union_dircheck(struct thread *td, struct vnode **vp, struct file *fp) 1310{ 1311 int error = 0; 1312 | 1210 if (vppp) { 1211 VREF(vp); 1212 *(*vppp)++ = vp; 1213 if (--(*cntp) == 0) 1214 panic("union: dircache table too small"); 1215 } else { 1216 (*cntp)++; 1217 } --- 87 unchanged lines hidden (view full) --- 1305/* 1306 * Module glue to remove #ifdef UNION from vfs_syscalls.c 1307 */ 1308static int 1309union_dircheck(struct thread *td, struct vnode **vp, struct file *fp) 1310{ 1311 int error = 0; 1312 |
1313 if ((*vp)->v_op == union_vnodeop_p) { | 1313 if ((*vp)->v_op == &union_vnodeops) { |
1314 struct vnode *lvp; 1315 1316 lvp = union_dircache_get(*vp, td); 1317 if (lvp != NULLVP) { 1318 struct vattr va; 1319 1320 /* 1321 * If the directory is opaque, --- 57 unchanged lines hidden --- | 1314 struct vnode *lvp; 1315 1316 lvp = union_dircache_get(*vp, td); 1317 if (lvp != NULLVP) { 1318 struct vattr va; 1319 1320 /* 1321 * If the directory is opaque, --- 57 unchanged lines hidden --- |