From: Sage Weil Date: Tue, 29 Sep 2015 01:31:23 +0000 (-0400) Subject: os/fs: fix aio submit method X-Git-Tag: v9.1.0~53^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6101%2Fhead;p=ceph.git os/fs: fix aio submit method 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 Signed-off-by: Sage Weil --- diff --git a/src/os/fs/FS.h b/src/os/fs/FS.h index c6601635a061..941fd1411b8f 100644 --- a/src/os/fs/FS.h +++ b/src/os/fs/FS.h @@ -94,7 +94,7 @@ public: 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) { @@ -105,7 +105,8 @@ public: return r; } assert(r == 1); - } while (false); + break; + } return 0; }