summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2023-10-04 13:19:16 +0200
committerChristian Brauner <brauner@kernel.org>2023-10-19 11:02:49 +0200
commit6c4d1c99d2ad5e12b897da482ca8305b929cb9ce (patch)
treea81195ab2ce738d733d84795757205a53d425604 /fs/namespace.c
parent95e93d17cb113a3b097774874572b69c058acab5 (diff)
vfs: stop counting on gcc not messing with mnt_expiry_mark if not asked
So happens it already was not doing it, but there is no need to "hope" as indicated in the comment. No changes in generated assembly. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20231004111916.728135-3-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 9e0ea73f2ff9..6bde71735efa 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1346,9 +1346,9 @@ void mntput(struct vfsmount *mnt)
{
if (mnt) {
struct mount *m = real_mount(mnt);
- /* avoid cacheline pingpong, hope gcc doesn't get "smart" */
+ /* avoid cacheline pingpong */
if (unlikely(m->mnt_expiry_mark))
- m->mnt_expiry_mark = 0;
+ WRITE_ONCE(m->mnt_expiry_mark, 0);
mntput_no_expire(m);
}
}