summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2005-03-13 11:45:51 +0000
committerJeff Roberson <jeff@FreeBSD.org>2005-03-13 11:45:51 +0000
commit9331fd135bf9ca019298b3b4526212df2263eff7 (patch)
tree3636b896d7dfb72f1dfba1090f24cb3e64211b1e
parent23f2513a4e573d5104eb2da6442feaf2d216f32b (diff)
Notes
-rw-r--r--sys/kern/vfs_extattr.c15
-rw-r--r--sys/kern/vfs_syscalls.c15
2 files changed, 10 insertions, 20 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 8c2c8b62a8ba..b949bc72553b 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.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);
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 8c2c8b62a8ba..b949bc72553b 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);