Don't try to create vnode_pager objects on other filesystems vnodes,
either they did it themselves or it won't happen.
This commit is contained in:
parent
c8445f769a
commit
a2b6f8bc03
@ -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 **);
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user