continue in a do while(false) will always eval false and break
out. To repeat, we need while (true) and an explicit break.
Reported-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: Sage Weil <sage@redhat.com>
int submit(aio_t &aio, int *retries) {
int attempts = 10;
iocb *piocb = &aio.iocb;
- do {
+ while (true) {
int r = io_submit(ctx, 1, &piocb);
if (r < 0) {
if (r == -EAGAIN && attempts-- > 0) {
return r;
}
assert(r == 1);
- } while (false);
+ break;
+ }
return 0;
}