]> git.karo-electronics.de Git - karo-tx-linux.git/commit
aio-use-cancellation-list-lazily-fix
authorKent Overstreet <koverstreet@google.com>
Wed, 20 Feb 2013 02:16:45 +0000 (13:16 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:54:05 +0000 (16:54 +1100)
commit85f5dd42bfbddb2a5ffdd53bc4fd6070ecec0a7d
tree39cba81eaec75aed852700f9f738a178ea7714ed
parentf4864f5e4e53b1eec8c3b67ca08879ee3b742ae6
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