Eliminate pointless goto.

This commit is contained in:
phk 2004-11-16 08:22:06 +00:00
parent b3f08741db
commit 79449e0341
2 changed files with 10 additions and 6 deletions

View File

@ -3711,12 +3711,14 @@ revoke(td, uap)
VOP_UNLOCK(vp, 0, td); VOP_UNLOCK(vp, 0, td);
if (td->td_ucred->cr_uid != vattr.va_uid) { if (td->td_ucred->cr_uid != vattr.va_uid) {
error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL); error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL);
if (error) if (error) {
goto out; vrele(vp);
return (error);
}
} }
if (vcount(vp) > 1) if (vcount(vp) > 1)
VOP_REVOKE(vp, REVOKEALL); VOP_REVOKE(vp, REVOKEALL);
out:
vrele(vp); vrele(vp);
return (error); return (error);
} }

View File

@ -3711,12 +3711,14 @@ revoke(td, uap)
VOP_UNLOCK(vp, 0, td); VOP_UNLOCK(vp, 0, td);
if (td->td_ucred->cr_uid != vattr.va_uid) { if (td->td_ucred->cr_uid != vattr.va_uid) {
error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL); error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL);
if (error) if (error) {
goto out; vrele(vp);
return (error);
}
} }
if (vcount(vp) > 1) if (vcount(vp) > 1)
VOP_REVOKE(vp, REVOKEALL); VOP_REVOKE(vp, REVOKEALL);
out:
vrele(vp); vrele(vp);
return (error); return (error);
} }