fs: use a consume fence in mnt_idmap()
PATCH 1/1 fs: use a consume fence in mnt_idmap()
The routine is used in link_path_walk() for every path component.
To my reading the entire point of the fence was to grab a fully populated mnt_idmap, but that's already going to happen with mere consume fence.
Eliminates an actual fence on arm64.
--- include/linux/mount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mount.h +1 -1
@@ -76,7 +76,7 @@ struct vfsmount {static inline struct mnt_idmap *mnt_idmap (const struct vfsmount *mnt) {/* Pairs with smp_store_release() in do_idmap_mount(). */ -return smp_load_acquire (&mnt->mnt_idmap); +return READ_ONCE (mnt->mnt_idmap); }extern int mnt_want_write (struct vfsmount *mnt);
Signature · 1 line
2.43.0
Quoted 9 lines · Mateusz Guzik
The routine is used in
link_path_walk()for every path component.To my reading the entire point of the fence was to grab a fully populated
mnt_idmap, but that's already going to happen with mere consume fence.Eliminates an actual fence on arm64.
[...]
Applied to the vfs-6.14.misc branch of the vfs/vfs.git tree. Patches in the vfs-6.14.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs-6.14.misc
[1/1] fs: use a consume fence in mnt_idmap()
https://git.kernel.org/vfs/vfs/c/e448a60956bc