diff mbox series

[06/11] nfs: use store_release_wake_up() for clearing d_fsdata

Message ID 20241206021830.3526922-7-neilb@suse.de (mailing list archive)
State New
Headers show
Series nfs: improve use of wake_up_bit and wake_up_var | expand

Commit Message

NeilBrown Dec. 6, 2024, 2:15 a.m. UTC
The barrier provided by smp_store_release() is before the store, while
wake_up_var() needs a full barrier *after* the store.

The new store_release_wake_up() interface encodes all the barriers
making this sort of bug harder to write.

Signed-off-by: NeilBrown <neilb@suse.de>
---
 fs/nfs/dir.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 492cffd9d3d8..ded86facef8f 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -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);
 }
 
 /*