Deleted Added
full compact
union_vfsops.c (54444) union_vfsops.c (54655)
1/*
2 * Copyright (c) 1994, 1995 The Regents of the University of California.
3 * Copyright (c) 1994, 1995 Jan-Simon Pendry.
4 * All rights reserved.
5 *
6 * This code is derived from software donated 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_vfsops.c 8.20 (Berkeley) 5/20/95
1/*
2 * Copyright (c) 1994, 1995 The Regents of the University of California.
3 * Copyright (c) 1994, 1995 Jan-Simon Pendry.
4 * All rights reserved.
5 *
6 * This code is derived from software donated 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_vfsops.c 8.20 (Berkeley) 5/20/95
38 * $FreeBSD: head/sys/fs/unionfs/union_vfsops.c 54444 1999-12-11 16:13:02Z eivind $
38 * $FreeBSD: head/sys/fs/unionfs/union_vfsops.c 54655 1999-12-15 23:02:35Z eivind $
39 */
40
41/*
42 * Union Layer
43 */
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/proc.h>
49#include <sys/vnode.h>
50#include <sys/mount.h>
51#include <sys/namei.h>
52#include <sys/malloc.h>
53#include <sys/filedesc.h>
54#include <miscfs/union/union.h>
39 */
40
41/*
42 * Union Layer
43 */
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/proc.h>
49#include <sys/vnode.h>
50#include <sys/mount.h>
51#include <sys/namei.h>
52#include <sys/malloc.h>
53#include <sys/filedesc.h>
54#include <miscfs/union/union.h>
55#include <vm/vm_zone.h>
55
56static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure");
57
58extern int union_init __P((struct vfsconf *));
59static int union_mount __P((struct mount *mp, char *path, caddr_t data,
60 struct nameidata *ndp, struct proc *p));
61static int union_root __P((struct mount *mp, struct vnode **vpp));
62static int union_statfs __P((struct mount *mp, struct statfs *sbp,

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

139
140#if 0
141 if (lowerrootvp->v_op == union_vnodeop_p)
142 vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY, p);
143#endif
144 if (error)
145 goto bad;
146
56
57static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure");
58
59extern int union_init __P((struct vfsconf *));
60static int union_mount __P((struct mount *mp, char *path, caddr_t data,
61 struct nameidata *ndp, struct proc *p));
62static int union_root __P((struct mount *mp, struct vnode **vpp));
63static int union_statfs __P((struct mount *mp, struct statfs *sbp,

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

140
141#if 0
142 if (lowerrootvp->v_op == union_vnodeop_p)
143 vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY, p);
144#endif
145 if (error)
146 goto bad;
147
148 NDFREE(ndp, NDF_ONLY_PNBUF);
147 upperrootvp = ndp->ni_vp;
148 vrele(ndp->ni_dvp);
149 ndp->ni_dvp = NULL;
150
151 UDEBUG(("mount_root UPPERVP %p locked = %d\n", upperrootvp,
152 VOP_ISLOCKED(upperrootvp, NULL)));
153
154 /*

--- 351 unchanged lines hidden ---
149 upperrootvp = ndp->ni_vp;
150 vrele(ndp->ni_dvp);
151 ndp->ni_dvp = NULL;
152
153 UDEBUG(("mount_root UPPERVP %p locked = %d\n", upperrootvp,
154 VOP_ISLOCKED(upperrootvp, NULL)));
155
156 /*

--- 351 unchanged lines hidden ---