]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Add smp_mb__after_clear_bit() to unlock_kiocb()
authorZach Brown <zach.brown@oracle.com>
Sat, 17 Sep 2005 02:28:09 +0000 (19:28 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 17 Sep 2005 18:50:02 +0000 (11:50 -0700)
commitf5065690e378fb018ee21b9586fb6478e2f862d1
treef55ea0606247dd2fef36905c9ae817060cfae149
parent6fd848ea9311ddfca6c150169ac08f4874a6d10b
[PATCH] Add smp_mb__after_clear_bit() to unlock_kiocb()

Add smp_mb__after_clear_bit() to unlock_kiocb()

AIO's use of wait_on_bit_lock()/wake_up_bit() forgot to add a barrier
between clearing its lock bit and calling wake_up_bit() so wake_up_bit()'s
unlocked waitqueue_active() can race.  This puts AIO's use in line with the
others and the comment above wake_up_bit().

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Acked-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