summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-13 11:45:51 +0000
committerjeff <jeff@FreeBSD.org>2005-03-13 11:45:51 +0000
commit938e1f1a5c43c357cee154cd9b9fd239db50e31b (patch)
tree3636b896d7dfb72f1dfba1090f24cb3e64211b1e /sys/kern/vfs_syscalls.c
parentd448a9ec0e03578f911debc16408665075c79e33 (diff)
downloadFreeBSD-src-938e1f1a5c43c357cee154cd9b9fd239db50e31b.zip
FreeBSD-src-938e1f1a5c43c357cee154cd9b9fd239db50e31b.tar.gz
- Don't VOP_UNLOCK prior to VOP_REVOKE. The lock is required now.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 8c2c8b6..b949bc7 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -3810,29 +3810,24 @@ revoke(td, uap)
NDFREE(&nd, NDF_ONLY_PNBUF);
if (vp->v_type != VCHR) {
error = EINVAL;
- goto putout;
+ goto out;
}
#ifdef MAC
error = mac_check_vnode_revoke(td->td_ucred, vp);
if (error)
- goto putout;
+ goto out;
#endif
error = VOP_GETATTR(vp, &vattr, td->td_ucred, td);
if (error)
- goto putout;
- VOP_UNLOCK(vp, 0, td);
+ goto out;
if (td->td_ucred->cr_uid != vattr.va_uid) {
error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL);
if (error)
- goto relout;
+ goto out;
}
if (vcount(vp) > 1)
VOP_REVOKE(vp, REVOKEALL);
-relout:
- vrele(vp);
- VFS_UNLOCK_GIANT(vfslocked);
- return (error);
-putout:
+out:
vput(vp);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
OpenPOWER on IntegriCloud