summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-11-17 08:01:10 +0000
committerphk <phk@FreeBSD.org>2004-11-17 08:01:10 +0000
commit313ccfcf9e23e29fc79adcefe9b9e1b52f7643ff (patch)
tree58ad6e043341e4831c8010d803a24ce8c0b279b1 /sys/kern/vfs_vnops.c
parent3dab450860a416318f4975a44933d133725c58bb (diff)
downloadFreeBSD-src-313ccfcf9e23e29fc79adcefe9b9e1b52f7643ff.zip
FreeBSD-src-313ccfcf9e23e29fc79adcefe9b9e1b52f7643ff.tar.gz
Push Giant down through select and poll.
Don't grab Giant in the upper syscall/wrapper code NET_LOCK_GIANT in the socket code (sockets/fifos). mtx_lock(&Giant) in the vnode code. Devfs grabs Giant if the driver is marked as needing Giant.
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 37204f3..cd5e669 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -850,7 +850,7 @@ vn_poll(fp, events, active_cred, td)
struct vnode *vp;
int error;
- GIANT_REQUIRED;
+ mtx_lock(&Giant);
vp = fp->f_vnode;
#ifdef MAC
@@ -861,6 +861,7 @@ vn_poll(fp, events, active_cred, td)
#endif
error = VOP_POLL(vp, events, fp->f_cred, td);
+ mtx_unlock(&Giant);
return (error);
}
OpenPOWER on IntegriCloud