Skip to content

Commit 3212a8f

Browse files
mjguzikbrauner
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 9b7da57 commit 3212a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/mount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct vfsmount {
7676
static inline struct mnt_idmap *mnt_idmap(const struct vfsmount *mnt)
7777
{
7878
/* Pairs with smp_store_release() in do_idmap_mount(). */
79-
return smp_load_acquire(&mnt->mnt_idmap);
79+
return READ_ONCE(mnt->mnt_idmap);
8080
}
8181

8282
extern int mnt_want_write(struct vfsmount *mnt);

0 commit comments

Comments
 (0)