]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] aio: avoid extra aio_{read,write} call when ki_left == 0
authorZach Brown <zach.brown@oracle.com>
Fri, 30 Sep 2005 18:58:56 +0000 (11:58 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 30 Sep 2005 19:41:17 +0000 (12:41 -0700)
commitdd69c863e6ceb69306929fab3b55926b5c3a29fc
treea93c6f5a88bf9c7382ccc7a08424e58ed1fec2e3
parentc85cd4e8dbcd1f799c14f96b20539b1b5b728205
[PATCH] aio: avoid extra aio_{read,write} call when ki_left == 0

Recently aio_p{read,write} changed to perform retries internally rather
than returning -EIOCBRETRY.  This inadvertantly resulted in always calling
aio_{read,write} with ki_left at 0 which would in turn immediately return
0.  Harmless, but we can avoid this call by checking in the caller.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/aio.c