From 5873f57b291d0abab88bfb1dac440952ad348424 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Wed, 19 Jan 2005 08:24:53 +0000 Subject: [PATCH] Remove unused coda_fbsd_getpages() --- sys/coda/coda_fbsd.c | 67 ---------------------------------------- sys/coda/coda_vnops.h | 1 - sys/fs/coda/coda_fbsd.c | 67 ---------------------------------------- sys/fs/coda/coda_vnops.h | 1 - 4 files changed, 136 deletions(-) diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index 19953e1d002d..d68b63fb83ea 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -105,73 +105,6 @@ static moduledata_t codadev_mod = { }; DECLARE_MODULE(codadev, codadev_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); -int -coda_fbsd_getpages(v) - void *v; -{ - struct vop_getpages_args *ap = v; - -#if 1 - return vop_stdgetpages(ap); -#else - { - struct vnode *vp = ap->a_vp; - struct cnode *cp = VTOC(vp); - struct vnode *cfvp = cp->c_ovp; - int opened_internally = 0; - struct ucred *cred = (struct ucred *) 0; - struct proc *p = curproc; - int error = 0; - - if (IS_CTL_VP(vp)) { - return(EINVAL); - } - - /* Redirect the request to UFS. */ - - if (cfvp == NULL) { - opened_internally = 1; - - error = VOP_OPEN(vp, FREAD, cred, p, -1); -printf("coda_getp: Internally Opening %p\n", vp); - - if (error) { - printf("coda_getpage: VOP_OPEN on container failed %d\n", error); - return (error); - } - if (vp->v_type == VREG) { - error = VOP_CREATEVOBJECT(vp, cred, p); - if (error != 0) { - printf("coda_getpage: VOP_CREATEVOBJECT() returns %d\n", error); - vput(vp); - return(error); - } - } - - cfvp = cp->c_ovp; - } else { -printf("coda_getp: has container %p\n", cfvp); - } - -printf("coda_fbsd_getpages: using container "); -/* - error = vnode_pager_generic_getpages(cfvp, ap->a_m, ap->a_count, - ap->a_reqpage); -*/ - error = VOP_GETPAGES(cfvp, ap->a_m, ap->a_count, - ap->a_reqpage, ap->a_offset); -printf("error = %d\n", error); - - /* Do an internal close if necessary. */ - if (opened_internally) { - (void)VOP_CLOSE(vp, FREAD, cred, p); - } - - return(error); - } -#endif -} - static void coda_fbsd_clone(arg, name, namelen, dev) void *arg; char *name; diff --git a/sys/coda/coda_vnops.h b/sys/coda/coda_vnops.h index c07e9bcde4fb..db8e3f86ec66 100644 --- a/sys/coda/coda_vnops.h +++ b/sys/coda/coda_vnops.h @@ -77,7 +77,6 @@ vop_unlock_t coda_unlock; vop_islocked_t coda_islocked; int coda_vop_error(void *); int coda_vop_nop(void *); -int coda_fbsd_getpages (void *); vop_pathconf_t coda_pathconf; int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw, diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 19953e1d002d..d68b63fb83ea 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -105,73 +105,6 @@ static moduledata_t codadev_mod = { }; DECLARE_MODULE(codadev, codadev_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); -int -coda_fbsd_getpages(v) - void *v; -{ - struct vop_getpages_args *ap = v; - -#if 1 - return vop_stdgetpages(ap); -#else - { - struct vnode *vp = ap->a_vp; - struct cnode *cp = VTOC(vp); - struct vnode *cfvp = cp->c_ovp; - int opened_internally = 0; - struct ucred *cred = (struct ucred *) 0; - struct proc *p = curproc; - int error = 0; - - if (IS_CTL_VP(vp)) { - return(EINVAL); - } - - /* Redirect the request to UFS. */ - - if (cfvp == NULL) { - opened_internally = 1; - - error = VOP_OPEN(vp, FREAD, cred, p, -1); -printf("coda_getp: Internally Opening %p\n", vp); - - if (error) { - printf("coda_getpage: VOP_OPEN on container failed %d\n", error); - return (error); - } - if (vp->v_type == VREG) { - error = VOP_CREATEVOBJECT(vp, cred, p); - if (error != 0) { - printf("coda_getpage: VOP_CREATEVOBJECT() returns %d\n", error); - vput(vp); - return(error); - } - } - - cfvp = cp->c_ovp; - } else { -printf("coda_getp: has container %p\n", cfvp); - } - -printf("coda_fbsd_getpages: using container "); -/* - error = vnode_pager_generic_getpages(cfvp, ap->a_m, ap->a_count, - ap->a_reqpage); -*/ - error = VOP_GETPAGES(cfvp, ap->a_m, ap->a_count, - ap->a_reqpage, ap->a_offset); -printf("error = %d\n", error); - - /* Do an internal close if necessary. */ - if (opened_internally) { - (void)VOP_CLOSE(vp, FREAD, cred, p); - } - - return(error); - } -#endif -} - static void coda_fbsd_clone(arg, name, namelen, dev) void *arg; char *name; diff --git a/sys/fs/coda/coda_vnops.h b/sys/fs/coda/coda_vnops.h index c07e9bcde4fb..db8e3f86ec66 100644 --- a/sys/fs/coda/coda_vnops.h +++ b/sys/fs/coda/coda_vnops.h @@ -77,7 +77,6 @@ vop_unlock_t coda_unlock; vop_islocked_t coda_islocked; int coda_vop_error(void *); int coda_vop_nop(void *); -int coda_fbsd_getpages (void *); vop_pathconf_t coda_pathconf; int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw,