Skip to content

Commit b8522ea

Browse files
Andrew MortonLinus Torvalds
authored andcommitted
aio is unlikely
Stick an unlikely() around is_aio(): I assert that most IO is synchronous. Cc: Suparna Bhattacharya <suparna@in.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Zach Brown <zach.brown@oracle.com> Cc: Ulrich Drepper <drepper@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b41eeef commit b8522ea

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎include/linux/aio.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
226226
__put_ioctx(kioctx); \
227227
} while (0)
228228

229-
#define in_aio() !is_sync_wait(current->io_wait)
229+
#define in_aio() (unlikely(!is_sync_wait(current->io_wait)))
230+
230231
/* may be used for debugging */
231232
#define warn_if_async() \
232233
do { \

0 commit comments

Comments
 (0)