io_uring_enter(): fix return value when interrupted
If a non-zero number of I/O requests have been submitted, this
number should be returned even if the sycall is interrupted by a
signal (which matches the Linux implementation), and the syscall
should not be restarted, otherwise the same I/O requests would be
submitted again.
@@ -1014,6 +1014,9 @@ simple_closure_function(7, 1, sysreturn, iour_getevents_bh,
blockq bq = iour->bq;
sysreturn rv;
if (flags & BLOCKQ_ACTION_NULLIFY) {
+ if (bound(submitted))
+ rv = bound(submitted);
+ else
rv = -ERESTARTSYS;
goto out;
}
