summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs
diff options
context:
space:
mode:
authorzack <zack@FreeBSD.org>2011-07-17 03:44:05 +0000
committerzack <zack@FreeBSD.org>2011-07-17 03:44:05 +0000
commit85b0371c75d10966f49f2bf952bf18b0f52a0180 (patch)
tree2209ea6ea532bd8b7d89dd7ca8d392a0320dc334 /sys/fs/nfs
parent1545102484217412172a3aecedecf580dff77637 (diff)
downloadFreeBSD-src-85b0371c75d10966f49f2bf952bf18b0f52a0180.zip
FreeBSD-src-85b0371c75d10966f49f2bf952bf18b0f52a0180.tar.gz
Revert revision 224079 as Rick pointed out that I would be calling VOP_PATHCONF
without the vnode lock held. Implicitly approved by: zml (mentor)
Diffstat (limited to 'sys/fs/nfs')
-rw-r--r--sys/fs/nfs/nfs_commonport.c2
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c17
2 files changed, 6 insertions, 13 deletions
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c
index 4935b70..0320f47 100644
--- a/sys/fs/nfs/nfs_commonport.c
+++ b/sys/fs/nfs/nfs_commonport.c
@@ -554,7 +554,7 @@ nfs_supportsnfsv4acls(struct vnode *vp)
if (nfsrv_useacl == 0)
return (0);
- error = nfsvno_pathconf(vp, _PC_ACL_NFS4, &retval, NULL, NULL);
+ error = VOP_PATHCONF(vp, _PC_ACL_NFS4, &retval);
if (error == 0 && retval != 0)
return (1);
return (0);
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 880381a..168018c 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -795,7 +795,6 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
struct dqblk dqb;
uid_t savuid;
#endif
- register_t chownres;
if (compare) {
retnotsup = 0;
@@ -1038,7 +1037,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
acl_free(naclp);
goto nfsmout;
}
- if (aceerr || nfsrv_compareacl(aclp, naclp))
+ if (aceerr || aclp == NULL ||
+ nfsrv_compareacl(aclp, naclp))
*retcmpp = NFSERR_NOTSAME;
acl_free(naclp);
} else {
@@ -1128,12 +1128,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
if (compare) {
if (!(*retcmpp)) {
- error = nfsvno_pathconf(vp,
- _PC_CHOWN_RESTRICTED, &chownres,
- nd->nd_cred, p);
- if (*tl != (chownres != 0 ?
- newnfs_true : newnfs_false))
- *retcmpp = NFSERR_NOTSAME;
+ if (*tl != newnfs_true)
+ *retcmpp = NFSERR_NOTSAME;
}
} else if (pc != NULL) {
pc->pc_chownrestricted =
@@ -1987,7 +1983,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
struct dqblk dqb;
uid_t savuid;
#endif
- register_t chownres;
/*
* First, set the bits that can be filled and get fsinfo.
@@ -2167,9 +2162,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
break;
case NFSATTRBIT_CHOWNRESTRICTED:
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
- error = nfsvno_pathconf(vp, _PC_CHOWN_RESTRICTED,
- &chownres, nd->nd_cred, p);
- *tl = (chownres ? newnfs_true : newnfs_false);
+ *tl = newnfs_true;
retnum += NFSX_UNSIGNED;
break;
case NFSATTRBIT_FILEHANDLE:
OpenPOWER on IntegriCloud