After going to some trouble to identify only the write-related events

to poll the write socket for, the fifo polling code proceeded to poll
for the complete set of events.  Use 'levents' instead of 'events' as
the argument to poll, and only poll the write socket if there is
interest in write events.

MFC after:	3 days
This commit is contained in:
Robert Watson 2005-09-12 10:13:15 +00:00
parent ab5182012a
commit 845e8e827b

View File

@ -641,11 +641,11 @@ fifo_poll_f(struct file *fp, int events, struct ucred *cred, struct thread *td)
}
}
levents = events & (POLLOUT | POLLWRNORM | POLLWRBAND);
if (events) {
if (levents) {
filetmp.f_data = fip->fi_writesock;
filetmp.f_cred = cred;
if (filetmp.f_data) {
revents |= soo_poll(&filetmp, events, cred, td);
revents |= soo_poll(&filetmp, levents, cred, td);
}
}
return (revents);