]> git.karo-electronics.de Git - karo-tx-linux.git/commit
aio-use-cancellation-list-lazily-fix
authorKent Overstreet <koverstreet@google.com>
Thu, 7 Feb 2013 01:32:05 +0000 (12:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:47:47 +0000 (16:47 +1100)
commit09d6023fc6d7740cc58a6eb487d00662efe1d9bf
tree2b17a16646b9b4e32ceb193fa8026476a4b01279
parent0f36e1a9b4acc40eabbb7c99db5ce2d09a172468
aio-use-cancellation-list-lazily-fix

The cancellation changes were fubar - we can't cancel a kiocb if it
doesn't actually have a cancellation callback.

The use of xchg() in aio_complete() was right - there we're marking the
kiocb as completed - but we need to use cmpxchg() in kiocb_cancel() - a
lock isn't sufficient since we're synchronizing with aio_complete() which
isn't taking any locks.

Signed-off-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/aio.c
include/linux/aio.h