From de8df1539f3811394ee55c51ea7f815189248de2 Mon Sep 17 00:00:00 2001 From: Quentin Barnes Date: Wed, 19 Mar 2008 17:00:39 -0700 Subject: [PATCH] --- yaml --- r: 87487 b: refs/heads/master c: 6cb2a21049b8990df4576c5fce4d48d0206c22d5 h: refs/heads/master i: 87485: a19009f0ded0915cf4d456c69acf79499784e15c 87483: c8915a770a25c2422c90980fdeaca84f328f84d9 87479: 1857c581d4b94d30eeb6eccd9e83630369ed215a 87471: 5fcfdbc1ce71a1aa2e87df392087746081a407b9 87455: 0c0fe8af1d97fbc9500caaad7a9098a91223a887 87423: aa2371e980e7e8982292b23d6f0ce2d97da7c310 v: v3 --- [refs] | 2 +- trunk/fs/aio.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 72889ff30e62..eca84269e21c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 264e3e889d86e552b4191d69bb60f4f3b383135a +refs/heads/master: 6cb2a21049b8990df4576c5fce4d48d0206c22d5 diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index b74c567383bc..6af921940622 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -996,6 +996,14 @@ int aio_complete(struct kiocb *iocb, long res, long res2) /* everything turned out well, dispose of the aiocb. */ ret = __aio_put_req(ctx, iocb); + /* + * We have to order our ring_info tail store above and test + * of the wait list below outside the wait lock. This is + * like in wake_up_bit() where clearing a bit has to be + * ordered with the unlocked test. + */ + smp_mb(); + if (waitqueue_active(&ctx->wait)) wake_up(&ctx->wait);