]> git.baikalelectronics.ru Git - kernel.git/commit
kernfs: make ->attr.open RCU protected.
authorImran Khan <imran.f.khan@oracle.com>
Wed, 15 Jun 2022 02:10:56 +0000 (12:10 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 14:46:14 +0000 (16:46 +0200)
commit5a34cd8c5951b7488ae48300f9d8f50186f6a44b
treeef0bf228f242f95a33a07088a2a811264cfa6c03
parentc10e6ad04765312cac097fa3a1c5f776d2d3f7c2
kernfs: make ->attr.open RCU protected.

After removal of kernfs_open_node->refcnt in the previous patch,
kernfs_open_node_lock can be removed as well by making ->attr.open
RCU protected. kernfs_put_open_node can delegate freeing to ->attr.open
to RCU and other readers of ->attr.open can do so under rcu_read_(un)lock.

Suggested by: Al Viro <viro@zeniv.linux.org.uk>

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
Link: https://lore.kernel.org/r/20220615021059.862643-2-imran.f.khan@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/file.c
include/linux/kernfs.h