Merge pull request #6101 from liewegas/wip-fs

os/fs: fix do loop

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Sage Weil 2015-09-29 17:42:08 -04:00
commit de29da4973

View File

@ -94,7 +94,7 @@ public:
int submit(aio_t &aio, int *retries) { int submit(aio_t &aio, int *retries) {
int attempts = 10; int attempts = 10;
iocb *piocb = &aio.iocb; iocb *piocb = &aio.iocb;
do { while (true) {
int r = io_submit(ctx, 1, &piocb); int r = io_submit(ctx, 1, &piocb);
if (r < 0) { if (r < 0) {
if (r == -EAGAIN && attempts-- > 0) { if (r == -EAGAIN && attempts-- > 0) {
@ -105,7 +105,8 @@ public:
return r; return r;
} }
assert(r == 1); assert(r == 1);
} while (false); break;
}
return 0; return 0;
} }