Skip to contentSkip to conversation

NFS: Use smp_mb__{before,after}_atomic()

PATCH In review Thierry Reding 2 participants 3 messages May 30, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Use smp_mb__{before,after}_atomic()

From: Thierry Reding <[email protected]>

Commit febdbfe8a91c (arch: Prepare for smp_mb__{before,after}_atomic()) deprecated the smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}*() functions in favour of the unified smp_mb__{before,after}_atomic().

While at it, convert the smb_mb__before_atomic()/clear_bit() pattern to the more idiomatic clear_bit_unlock().

---
 fs/nfs/pagelist.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/nfs/pagelist.c +2 -3
index 353331969626..c00d4f1de8ef 100644
@@ -173,9 +173,8 @@ nfs_page_group_unlock(struct nfs_page *req)
 
 	WARN_ON_ONCE(head != head->wb_head);
 
-	smp_mb__before_clear_bit();
-	clear_bit(PG_HEADLOCK, &head->wb_flags);
-	smp_mb__after_clear_bit();
+	clear_bit_unlock(PG_HEADLOCK, &head->wb_flags);
+	smp_mb__after_atomic();
 	wake_up_bit(&head->wb_flags, PG_HEADLOCK);
 }
 
Signature · 1 line
1.9.2
#1 lore raw
Quoted 5 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Commit febdbfe8a91c (arch: Prepare for smp_mb__{before,after}_atomic()) deprecated the smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}*() functions in favour of the unified smp_mb__{before,after}_atomic().

Where is this commit? It doesn't seem to have hit upstream yet.

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, PrimaryData
[email protected]
#2 lore raw
Quoted 8 lines · Trond Myklebust
Quoted 5 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Commit febdbfe8a91c (arch: Prepare for smp_mb__{before,after}_atomic()) deprecated the smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}*() functions in favour of the unified smp_mb__{before,after}_atomic().

Where is this commit? It doesn't seem to have hit upstream yet.

It's been in linux-next for over 5 weeks now, so I'd expect it to hit 3.16 during the merge window.

Thierry