diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nfs/nfs_commonport.c | 2 | ||||
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdport.c | 10 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_map.c | 4 | ||||
-rw-r--r-- | sys/fs/unionfs/union_subr.c | 13 |
4 files changed, 7 insertions, 22 deletions
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index acc387d..fe9b94a 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -211,7 +211,7 @@ nfsrv_lookupfilename(struct nameidata *ndp, char *fname, NFSPROC_T *p) { int error; - NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, UIO_USERSPACE, fname, + NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, fname, p); error = namei(ndp); if (!error) { diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 877f990..1234a4a 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -2060,8 +2060,7 @@ again: cn.cn_nameptr = dp->d_name; cn.cn_namelen = nlen; cn.cn_flags = ISLASTCN | - NOFOLLOW | LOCKLEAF | - MPSAFE; + NOFOLLOW | LOCKLEAF; if (nlen == 2 && dp->d_name[0] == '.' && dp->d_name[1] == '.') @@ -2647,10 +2646,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_t *fhp, struct sockaddr *nam, *credp = NULL; exp->nes_numsecflavor = 0; - if (VFS_NEEDSGIANT(mp)) - error = ESTALE; - else - error = VFS_FHTOVP(mp, &fhp->fh_fid, lktype, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, lktype, vpp); if (error != 0) /* Make sure the server replies ESTALE to the client. */ error = ESTALE; @@ -2825,7 +2821,7 @@ nfsrv_v4rootexport(void *argp, struct ucred *cred, struct thread *p) /* * If fspec != NULL, this is the v4root path. */ - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_USERSPACE, + NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, nfsexargp->fspec, p); if ((error = namei(&nd)) != 0) goto out; diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index 4396aca..3f57add 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -84,7 +84,7 @@ procfs_doprocmap(PFS_FILL_ARGS) struct vnode *vp; char *fullpath, *freepath; struct ucred *cred; - int error, vfslocked; + int error; unsigned int last_timestamp; #ifdef COMPAT_FREEBSD32 int wrap32 = 0; @@ -189,9 +189,7 @@ procfs_doprocmap(PFS_FILL_ARGS) VM_OBJECT_UNLOCK(obj); if (vp != NULL) { vn_fullpath(td, vp, &fullpath, &freepath); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vrele(vp); - VFS_UNLOCK_GIANT(vfslocked); } } else { type = "none"; diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 528271c..d3532027 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -331,7 +331,6 @@ unionfs_nodeget_out: void unionfs_noderem(struct vnode *vp, struct thread *td) { - int vfslocked; int count; struct unionfs_node *unp, *unp_t1, *unp_t2; struct unionfs_node_hashhead *hd; @@ -366,20 +365,12 @@ unionfs_noderem(struct vnode *vp, struct thread *td) if (lockmgr(vp->v_vnlock, LK_EXCLUSIVE, VI_MTX(vp)) != 0) panic("the lock for deletion is unacquirable."); - if (lvp != NULLVP) { - vfslocked = VFS_LOCK_GIANT(lvp->v_mount); + if (lvp != NULLVP) vrele(lvp); - VFS_UNLOCK_GIANT(vfslocked); - } - if (uvp != NULLVP) { - vfslocked = VFS_LOCK_GIANT(uvp->v_mount); + if (uvp != NULLVP) vrele(uvp); - VFS_UNLOCK_GIANT(vfslocked); - } if (dvp != NULLVP) { - vfslocked = VFS_LOCK_GIANT(dvp->v_mount); vrele(dvp); - VFS_UNLOCK_GIANT(vfslocked); unp->un_dvp = NULLVP; } if (unp->un_path != NULL) { |