From a2b6f8bc03a550270367392f9eea344c5990f0d3 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 24 Jan 2005 22:09:13 +0000 Subject: [PATCH] Don't try to create vnode_pager objects on other filesystems vnodes, either they did it themselves or it won't happen. --- sys/nfsserver/nfs.h | 1 - sys/nfsserver/nfs_serv.c | 2 -- sys/nfsserver/nfs_srvsubs.c | 15 --------------- 3 files changed, 18 deletions(-) diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h index 31d049cd3d79..07ba71a2ee1b 100644 --- a/sys/nfsserver/nfs.h +++ b/sys/nfsserver/nfs.h @@ -351,7 +351,6 @@ void nfsrv_init(int); int nfsrv_errmap(struct nfsrv_descript *, int); void nfsrvw_sort(gid_t *, int); void nfsrv_setcred(struct ucred *, struct ucred *); -int nfsrv_object_create(struct vnode *); void nfsrv_wakenfsd(struct nfssvc_sock *slp); int nfsrv_writegather(struct nfsrv_descript **, struct nfssvc_sock *, struct thread *, struct mbuf **); diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 1f6e339eca86..02adc491f21f 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -1850,7 +1850,6 @@ nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, if (error) NDFREE(&nd, NDF_ONLY_PNBUF); else { - nfsrv_object_create(nd.ni_vp); if (exclusive_flag) { exclusive_flag = 0; VATTR_NULL(vap); @@ -1906,7 +1905,6 @@ nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, if (error) goto ereply; - nfsrv_object_create(nd.ni_vp); if (nd.ni_cnd.cn_flags & ISSYMLINK) { error = EINVAL; goto ereply; diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index 3aa9534066cd..7746efcdf99a 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -788,7 +788,6 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len, * not zfree it again when we break. */ if ((cnp->cn_flags & ISSYMLINK) == 0) { - nfsrv_object_create(ndp->ni_vp); if (cnp->cn_flags & (SAVENAME | SAVESTART)) cnp->cn_flags |= HASBUF; else @@ -1119,8 +1118,6 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, else *rdonlyp = 0; - nfsrv_object_create(*vpp); - if (!lockflag) VOP_UNLOCK(*vpp, 0, td); out: @@ -1224,18 +1221,6 @@ nfsrv_errmap(struct nfsrv_descript *nd, int err) return (NFSERR_IO); } -int -nfsrv_object_create(struct vnode *vp) -{ - - GIANT_REQUIRED; - NFSD_UNLOCK_ASSERT(); - - if (vp == NULL || vp->v_type != VREG) - return (1); - return (VOP_CREATEVOBJECT(vp, curthread->td_ucred, curthread)); -} - /* * Sort the group list in increasing numerical order. * (Insertion sort by Chris Torek, who was grossed out by the bubble sort