diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-05-26 00:33:46 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-05-26 00:33:46 +0000 |
commit | 6076db144c5ee267e42bff4d3f33bdd00abc389b (patch) | |
tree | 432c2b93feff2d11d747476687927cf20509a508 /sys/compat | |
parent | 40b0596b9aa87e81b667caabb171ebbb23994418 (diff) |
RIP stackable filesystems, ok marius@ tedu@, discussed with deraadt@
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/common/vfs_syscalls_43.c | 30 | ||||
-rw-r--r-- | sys/compat/linux/linux_getcwd.c | 24 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_getcwd.c | 24 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_getdents.c | 56 |
4 files changed, 6 insertions, 128 deletions
diff --git a/sys/compat/common/vfs_syscalls_43.c b/sys/compat/common/vfs_syscalls_43.c index 86b3edfd681..e95f45114de 100644 --- a/sys/compat/common/vfs_syscalls_43.c +++ b/sys/compat/common/vfs_syscalls_43.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls_43.c,v 1.25 2004/07/14 18:57:57 millert Exp $ */ +/* $OpenBSD: vfs_syscalls_43.c,v 1.26 2005/05/26 00:33:45 pedro Exp $ */ /* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */ /* @@ -66,17 +66,6 @@ static void cvtstat(struct stat *, struct stat43 *); /* - * Redirection info so we don't have to include the union fs routines in - * the kernel directly. This way, we can build unionfs as an LKM. The - * pointer gets replaced later, when we modload the LKM, or when the - * compiled-in unionfs code gets initialized. Initial, stub routine - * value is compiled in from kern/vfs_syscalls.c - */ - -extern int (*union_check_p)(struct proc *, struct vnode **, - struct file *, struct uio, int *); - -/* * Convert from a new to an old stat structure. */ static void @@ -366,7 +355,6 @@ compat_43_sys_getdirentries(p, v, retval) goto bad; } vp = (struct vnode *)fp->f_data; -unionread: if (vp->v_type != VDIR) { error = EINVAL; goto bad; @@ -441,24 +429,8 @@ unionread: VOP_UNLOCK(vp, 0, p); if (error) goto bad; - if ((SCARG(uap, count) == auio.uio_resid) && - union_check_p && - (union_check_p(p, &vp, fp, auio, &error) != 0)) - goto unionread; if (error) goto bad; - - if ((SCARG(uap, count) == auio.uio_resid) && - (vp->v_flag & VROOT) && - (vp->v_mount->mnt_flag & MNT_UNION)) { - struct vnode *tvp = vp; - vp = vp->v_mount->mnt_vnodecovered; - VREF(vp); - fp->f_data = (caddr_t) vp; - fp->f_offset = 0; - vrele(tvp); - goto unionread; - } error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep), sizeof(long)); *retval = SCARG(uap, count) - auio.uio_resid; diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c index 5fe168f12f0..8038ca2c9cf 100644 --- a/sys/compat/linux/linux_getcwd.c +++ b/sys/compat/linux/linux_getcwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_getcwd.c,v 1.5 2004/08/03 12:10:47 todd Exp $ */ +/* $OpenBSD: linux_getcwd.c,v 1.6 2005/05/26 00:33:45 pedro Exp $ */ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ /*- @@ -268,27 +268,7 @@ unionread: } } } while (!eofflag); -#if 0 - /* - * Deal with mount -o union, which unions only the - * root directory of the mount. - */ - if ((uvp->v_flag & VROOT) && - (uvp->v_mount->mnt_flag & MNT_UNION)) { - struct vnode *tvp = uvp; - uvp = uvp->v_mount->mnt_vnodecovered; - vput(tvp); - VREF(uvp); - *uvpp = uvp; - error = vn_lock(uvp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) { - vrele(uvp); - *uvpp = uvp = NULL; - goto out; - } - goto unionread; - } -#endif + error = ENOENT; out: diff --git a/sys/compat/netbsd/netbsd_getcwd.c b/sys/compat/netbsd/netbsd_getcwd.c index 5c5a00ebde6..330e7d405b5 100644 --- a/sys/compat/netbsd/netbsd_getcwd.c +++ b/sys/compat/netbsd/netbsd_getcwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netbsd_getcwd.c,v 1.7 2004/08/03 12:10:47 todd Exp $ */ +/* $OpenBSD: netbsd_getcwd.c,v 1.8 2005/05/26 00:33:45 pedro Exp $ */ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ /*- @@ -262,27 +262,7 @@ unionread: } } } while (!eofflag); -#if 0 - /* - * Deal with mount -o union, which unions only the - * root directory of the mount. - */ - if ((uvp->v_flag & VROOT) && - (uvp->v_mount->mnt_flag & MNT_UNION)) { - struct vnode *tvp = uvp; - uvp = uvp->v_mount->mnt_vnodecovered; - vput(tvp); - VREF(uvp); - *uvpp = uvp; - error = vn_lock(uvp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) { - vrele(uvp); - *uvpp = uvp = NULL; - goto out; - } - goto unionread; - } -#endif + error = ENOENT; out: diff --git a/sys/compat/netbsd/netbsd_getdents.c b/sys/compat/netbsd/netbsd_getdents.c index 53f2d7c5efd..dd621bd4bd4 100644 --- a/sys/compat/netbsd/netbsd_getdents.c +++ b/sys/compat/netbsd/netbsd_getdents.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netbsd_getdents.c,v 1.8 2003/06/02 23:28:00 millert Exp $ */ +/* $OpenBSD: netbsd_getdents.c,v 1.9 2005/05/26 00:33:45 pedro Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -66,7 +66,6 @@ netbsd_vn_readdir(fp, buf, segflg, count, done, p, cookies, ncookies) struct uio auio; int error, eofflag; -unionread: if (vp->v_type != VDIR) return (EINVAL); aiov.iov_base = buf; @@ -85,59 +84,6 @@ unionread: VOP_UNLOCK(vp, 0, p); if (error) return (error); - -#ifdef UNION -{ - extern int (**union_vnodeop_p)(void *); - extern struct vnode *union_dircache(struct vnode *); - - if (count == auio.uio_resid && (vp->v_op == union_vnodeop_p)) { - struct vnode *lvp; - - lvp = union_dircache(vp); - if (lvp != NULLVP) { - struct vattr va; - - /* - * If the directory is opaque, - * then don't show lower entries - */ - error = VOP_GETATTR(vp, &va, fp->f_cred, p); - if (va.va_flags & OPAQUE) { - vput(lvp); - lvp = NULL; - } - } - - if (lvp != NULLVP) { - error = VOP_OPEN(lvp, FREAD, fp->f_cred, p); - if (error) { - vput(lvp); - return (error); - } - VOP_UNLOCK(lvp, 0, p); - fp->f_data = (caddr_t) lvp; - fp->f_offset = 0; - error = vn_close(vp, FREAD, fp->f_cred, p); - if (error) - return (error); - vp = lvp; - goto unionread; - } - } -} -#endif /* UNION */ - - if (count == auio.uio_resid && (vp->v_flag & VROOT) && - (vp->v_mount->mnt_flag & MNT_UNION)) { - struct vnode *tvp = vp; - vp = vp->v_mount->mnt_vnodecovered; - VREF(vp); - fp->f_data = (caddr_t) vp; - fp->f_offset = 0; - vrele(tvp); - goto unionread; - } *done = count - auio.uio_resid; return error; } |