]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kernfs: remove iattr_mutex
authorChristian Brauner <brauner@kernel.org>
Mon, 23 Jun 2025 06:38:51 +0000 (23:38 -0700)
committerChristian Brauner <brauner@kernel.org>
Wed, 2 Jul 2025 12:18:20 +0000 (14:18 +0200)
commitfb7b30cb0e31bce904b4ec6a20e863351f9fee82
tree9b620d3d6d054a73b9289966d1e6a5063aecb506
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
kernfs: remove iattr_mutex

All allocations of struct kernfs_iattrs are serialized through a global
mutex. Simply do a racy allocation and let the first one win. I bet most
callers are under inode->i_rwsem anyway and it wouldn't be needed but
let's not require that.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/20250623063854.1896364-2-song@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/kernfs/inode.c