]> git.ipfire.org Git - thirdparty/linux.git/commit
fs: add missing fences to I_NEW handling
authorMateusz Guzik <mjguzik@gmail.com>
Sun, 5 Oct 2025 23:15:26 +0000 (01:15 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 20 Oct 2025 18:22:25 +0000 (20:22 +0200)
commit31e332b911fca54df467d264d7e2a2ef9317f3ca
treea75a50f16b26f6e8cfbf4869b46b4c5004e5f30a
parent0f607a89afe679265602c58097edf952b1e564ab
fs: add missing fences to I_NEW handling

Suppose there are 2 CPUs racing inode hash lookup func (say ilookup5())
and unlock_new_inode().

In principle the latter can clear the I_NEW flag before prior stores
into the inode were made visible.

The former can in turn observe I_NEW is cleared and proceed to use the
inode, while possibly reading from not-yet-published areas.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/dcache.c
fs/inode.c
include/linux/writeback.h