]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
aio: kill the misleading rcu read locks in ioctx_add_table() and kill_ioctx()
authorOleg Nesterov <oleg@redhat.com>
Wed, 30 Apr 2014 14:16:36 +0000 (16:16 +0200)
committerBenjamin LaHaise <bcrl@kvack.org>
Tue, 24 Jun 2014 22:10:25 +0000 (18:10 -0400)
commit855ef0dec7271ff7be7381feaaf3f4aed80bd503
tree1291243a3364240702b03ef74bac539c674583ab
parent4b70ac5fd9b58bfaa5f25b4ea48f528aefbf3308
aio: kill the misleading rcu read locks in ioctx_add_table() and kill_ioctx()

ioctx_add_table() is the writer, it does not need rcu_read_lock() to
protect ->ioctx_table. It relies on mm->ioctx_lock and rcu locks just
add the confusion.

And it doesn't need rcu_dereference() by the same reason, it must see
any updates previously done under the same ->ioctx_lock. We could use
rcu_dereference_protected() but the patch uses rcu_dereference_raw(),
the function is simple enough.

The same for kill_ioctx(), although it does not update the pointer.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
fs/aio.c