Page MenuHomeFreeBSD

D3814.diff
No OneTemporary

D3814.diff

Index: sys/kern/vfs_aio.c
===================================================================
--- sys/kern/vfs_aio.c
+++ sys/kern/vfs_aio.c
@@ -2494,8 +2494,11 @@
ops->store_aiocb(aiocbp, NULL);
- timo = 0;
- if (ts) {
+ if (ts == NULL) {
+ timo = 0;
+ } else if (ts->tv_sec == 0 && ts->tv_nsec == 0) {
+ timo = -1;
+ } else {
if ((ts->tv_nsec < 0) || (ts->tv_nsec >= 1000000000))
return (EINVAL);
@@ -2513,6 +2516,10 @@
cb = NULL;
AIO_LOCK(ki);
while ((cb = TAILQ_FIRST(&ki->kaio_done)) == NULL) {
+ if (timo == -1) {
+ error = EWOULDBLOCK;
+ break;
+ }
ki->kaio_flags |= KAIO_WAKEUP;
error = msleep(&p->p_aioinfo, AIO_MTX(ki), PRIBIO | PCATCH,
"aiowc", timo);

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 23, 5:35 AM (1 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27876978
Default Alt Text
D3814.diff (704 B)

Event Timeline