summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index fa953cd..175b50f 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -1543,12 +1543,12 @@ aio_suspend(struct proc *p, struct aio_suspend_args *uap)
}
}
}
+ splx(s);
ki->kaio_flags |= KAIO_WAKEUP;
error = tsleep(p, PRIBIO | PCATCH, "aiospn", timo);
- splx(s);
- if (error == EINTR) {
+ if (error == ERESTART || error == EINTR) {
zfree(aiol_zone, ijoblist);
zfree(aiol_zone, ujoblist);
return EINTR;
@@ -1614,6 +1614,16 @@ aio_error(struct proc *p, struct aio_error_args *uap)
return 0;
}
}
+
+ for (cb = TAILQ_FIRST(&ki->kaio_sockqueue); cb; cb = TAILQ_NEXT(cb,
+ plist)) {
+ if (((intptr_t)cb->uaiocb._aiocb_private.kernelinfo) ==
+ jobref) {
+ p->p_retval[0] = EINPROGRESS;
+ splx(s);
+ return 0;
+ }
+ }
splx(s);
s = splbio();
OpenPOWER on IntegriCloud