]> git.ipfire.org Git - thirdparty/kernel/linux.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>
Mon, 23 Jun 2025 11:03:12 +0000 (13:03 +0200)
commitd1f4e9026007d50e6b28cf8f57a38f03fc3b0ce6
tree2d22a885cb79109a4768a4b9bdc5b1cddf38d1d8
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