]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFS: Fix wakeup of __nfs_lookup_revalidate() in unblock_revalidate()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 18 Jul 2025 23:15:27 +0000 (16:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:14:04 +0000 (12:14 +0200)
[ Upstream commit 1db3a48e83bb64a70bf27263b7002585574a9c2d ]

Use store_release_wake_up() to add the appropriate memory barrier before
calling wake_up_var(&dentry->d_fsdata).

Reported-by: Lukáš Hejtmánek<xhejtman@ics.muni.cz>
Suggested-by: Santosh Pradhan <santosh.pradhan@gmail.com>
Link: https://lore.kernel.org/all/18945D18-3EDB-4771-B019-0335CE671077@ics.muni.cz/
Fixes: 99bc9f2eb3f7 ("NFS: add barriers when testing for NFS_FSDATA_BLOCKED")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/dir.c

index f9f4a92f63e929cc18a2a3659482404d44fc13d3..bbc625e742aa301a33685bb80ac0854f31e0382c 100644 (file)
@@ -1837,9 +1837,7 @@ static void block_revalidate(struct dentry *dentry)
 
 static void unblock_revalidate(struct dentry *dentry)
 {
-       /* store_release ensures wait_var_event() sees the update */
-       smp_store_release(&dentry->d_fsdata, NULL);
-       wake_up_var(&dentry->d_fsdata);
+       store_release_wake_up(&dentry->d_fsdata, NULL);
 }
 
 /*