Give vn_poll single exit point (to make it easier to insert

"mtx_unlock(&Giant)" real soon now).
This commit is contained in:
Poul-Henning Kamp 2004-11-15 21:56:42 +00:00
parent f661e9a0bc
commit f608397595
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137753

View File

@ -848,9 +848,7 @@ vn_poll(fp, events, active_cred, td)
struct thread *td;
{
struct vnode *vp;
#ifdef MAC
int error;
#endif
GIANT_REQUIRED;
@ -859,11 +857,11 @@ vn_poll(fp, events, active_cred, td)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
error = mac_check_vnode_poll(active_cred, fp->f_cred, vp);
VOP_UNLOCK(vp, 0, td);
if (error)
return (error);
if (!error)
#endif
return (VOP_POLL(vp, events, fp->f_cred, td));
error = VOP_POLL(vp, events, fp->f_cred, td);
return (error);
}
/*