Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142684442
D3814.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
704 B
Referenced Files
None
Subscribers
None
D3814.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3814: aio_waitcomplete(2) should not sleep when timeout is not NULL, but set to 0.
Attached
Detach File
Event Timeline
Log In to Comment