Skip to content

Commit 6c4d1c9

Browse files
mjguzikbrauner
authored andcommitted
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>
1 parent 95e93d1 commit 6c4d1c9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/namespace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,9 +1346,9 @@ void mntput(struct vfsmount *mnt)
13461346
{
13471347
if (mnt) {
13481348
struct mount *m = real_mount(mnt);
1349-
/* avoid cacheline pingpong, hope gcc doesn't get "smart" */
1349+
/* avoid cacheline pingpong */
13501350
if (unlikely(m->mnt_expiry_mark))
1351-
m->mnt_expiry_mark = 0;
1351+
WRITE_ONCE(m->mnt_expiry_mark, 0);
13521352
mntput_no_expire(m);
13531353
}
13541354
}

0 commit comments

Comments
 (0)