]> git.baikalelectronics.ru Git - kernel.git/commit
kernfs: Change kernfs_notify_list to llist.
authorImran Khan <imran.f.khan@oracle.com>
Wed, 15 Jun 2022 02:10:57 +0000 (12:10 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 14:46:15 +0000 (16:46 +0200)
commitaab43507e4d8047b0de2d7b1376ec15a733502a5
tree3c7277dc358aeed06e9e1a5c217e7746a09f46ce
parent5a34cd8c5951b7488ae48300f9d8f50186f6a44b
kernfs: Change kernfs_notify_list to llist.

At present kernfs_notify_list is implemented as a singly linked
list of kernfs_node(s), where last element points to itself and
value of ->attr.next tells if node is present on the list or not.
Both addition and deletion to list happen under kernfs_notify_lock.

Change kernfs_notify_list to llist so that addition to list can heppen
locklessly.

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-3-imran.f.khan@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/file.c
include/linux/kernfs.h