Remove unused coda_fbsd_getpages()

This commit is contained in:
Poul-Henning Kamp 2005-01-19 08:24:53 +00:00
parent 973bfe6c4a
commit 5873f57b29
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140470
4 changed files with 0 additions and 136 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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,