diff options
author | phk <phk@FreeBSD.org> | 2004-11-15 21:56:42 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-11-15 21:56:42 +0000 |
commit | c9410652857a3b46f2b616d0b417681e926c10fa (patch) | |
tree | 782ca616d1ac622d189acf62c8ba8fefcfd18045 /sys/kern/vfs_vnops.c | |
parent | 8f49227258f1574dc23538fe58e943b80a7027fe (diff) | |
download | FreeBSD-src-c9410652857a3b46f2b616d0b417681e926c10fa.zip FreeBSD-src-c9410652857a3b46f2b616d0b417681e926c10fa.tar.gz |
Give vn_poll single exit point (to make it easier to insert
"mtx_unlock(&Giant)" real soon now).
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index d819688..37204f3 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -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); } /* |