Re: [PATCH kernfs 2/3] kernfs: switch global kernfs_rename_lock to per-fs lock

From: Tejun Heo
Date: Mon Apr 14 2025 - 13:26:39 EST


On Sat, Apr 12, 2025 at 02:31:08AM +0800, alexjlzheng@xxxxxxxxx wrote:
> From: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>
>
> The kernfs implementation has big lock granularity(kernfs_rename_lock) so
> every kernfs-based(e.g., sysfs, cgroup) fs are able to compete the lock.
>
> This patch switches the global kernfs_rename_lock to per-fs lock, which
> put the rwlock into kernfs_root.
>
> Signed-off-by: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun