Eliminate pointless goto.

This commit is contained in:
Poul-Henning Kamp 2004-11-16 08:22:06 +00:00
parent 7f21497282
commit 9bb4281603
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137767
2 changed files with 10 additions and 6 deletions

View file

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

View file

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