Otherwise we could both end up putting entries in there twice,
if there are still in flight, or having done entries in there too.
So restart the suspend list after aio_suspend(), so we only put
truly still-pending ios in there.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
struct flist_head *entry;
struct timespec start;
int have_timeout = 0;
- int suspend_entries = 0;
+ int suspend_entries;
unsigned int r;
if (t && !fill_timespec(&start))
memset(&start, 0, sizeof(start));
r = 0;
- memset(suspend_list, 0, sizeof(*suspend_list));
restart:
+ memset(suspend_list, 0, sizeof(*suspend_list));
+ suspend_entries = 0;
flist_for_each(entry, &td->io_u_busylist) {
struct io_u *io_u = flist_entry(entry, struct io_u, list);
int err;