From: Oleg Nesterov Date: Wed, 30 Apr 2014 14:16:36 +0000 (+0200) Subject: aio: kill the misleading rcu read locks in ioctx_add_table() and kill_ioctx() X-Git-Tag: omap-for-v3.17/fixes-against-rc2~50^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=855ef0dec7271ff7be7381feaaf3f4aed80bd503;p=pandora-kernel.git 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 Signed-off-by: Benjamin LaHaise --- Reading git-diff-tree failed