Skip to content

Commit c7548af

Browse files
author
Chris Mason
committed
Btrfs: convert smp_mb__{before,after}_clear_bit
The new call is smp_mb__{before,after}_atomic. The __ gives us extra protection from the atomic rays. Signed-off-by: Chris Mason <clm@fb.com>
1 parent 6eda71d commit c7548af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/btrfs/transaction.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static int record_root_in_trans(struct btrfs_trans_handle *trans,
290290
* done before we pop in the zero below
291291
*/
292292
btrfs_init_reloc_root(trans, root);
293-
smp_mb__before_clear_bit();
293+
smp_mb__before_atomic();
294294
clear_bit(BTRFS_ROOT_IN_TRANS_SETUP, &root->state);
295295
}
296296
return 0;
@@ -1060,7 +1060,7 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans,
10601060

10611061
/* see comments in should_cow_block() */
10621062
clear_bit(BTRFS_ROOT_FORCE_COW, &root->state);
1063-
smp_mb__after_clear_bit();
1063+
smp_mb__after_atomic();
10641064

10651065
if (root->commit_root != root->node) {
10661066
list_add_tail(&root->dirty_list,

0 commit comments

Comments
 (0)