mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
When write(2) on eventfd object fails with the error EAGAIN do not return
the number of bytes written. MFC after: 1 week
This commit is contained in:
parent
2bb14e7541
commit
09806d8e3e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297297
@ -751,6 +751,8 @@ eventfd_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
|
||||
if (UINT64_MAX - efd->efd_count <= count) {
|
||||
if ((efd->efd_flags & LINUX_O_NONBLOCK) != 0) {
|
||||
mtx_unlock(&efd->efd_lock);
|
||||
/* Do not not return the number of bytes written */
|
||||
uio->uio_resid += sizeof(eventfd_t);
|
||||
return (EAGAIN);
|
||||
}
|
||||
error = mtx_sleep(&efd->efd_count, &efd->efd_lock,
|
||||
|
Loading…
Reference in New Issue
Block a user