Re: [PATCH 3/5] kernfs: Change kernfs_notify_list to llist.

From: Tejun Heo
Date: Thu May 05 2022 - 16:03:07 EST


On Thu, Apr 28, 2022 at 03:54:29PM +1000, Imran Khan wrote:
> 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. We still need kernfs_notify_lock for consumers (kernfs_notify\
> _workfn) because there can be multiple concurrent work items.
>
> Suggested by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Imran Khan <imran.f.khan@xxxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun