From: Mateusz Guzik Date: Sat, 30 Nov 2024 05:17:11 +0000 (+0100) Subject: fs: use a consume fence in mnt_idmap() X-Git-Tag: v6.14-rc1~216^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3212a8f34021a16d13ace91d3ac5f451ef8d0103;p=thirdparty%2Flinux.git 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. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20241130051712.1036527-1-mjguzik@gmail.com Signed-off-by: Christian Brauner --- diff --git a/include/linux/mount.h b/include/linux/mount.h index c34c18b4e8f36..33f17b6e87323 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -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);