Commit c7548af6 authored by Chris Mason's avatar Chris Mason

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: default avatarChris Mason <clm@fb.com>
parent 6eda71d0
...@@ -290,7 +290,7 @@ static int record_root_in_trans(struct btrfs_trans_handle *trans, ...@@ -290,7 +290,7 @@ static int record_root_in_trans(struct btrfs_trans_handle *trans,
* done before we pop in the zero below * done before we pop in the zero below
*/ */
btrfs_init_reloc_root(trans, root); btrfs_init_reloc_root(trans, root);
smp_mb__before_clear_bit(); smp_mb__before_atomic();
clear_bit(BTRFS_ROOT_IN_TRANS_SETUP, &root->state); clear_bit(BTRFS_ROOT_IN_TRANS_SETUP, &root->state);
} }
return 0; return 0;
...@@ -1060,7 +1060,7 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans, ...@@ -1060,7 +1060,7 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans,
/* see comments in should_cow_block() */ /* see comments in should_cow_block() */
clear_bit(BTRFS_ROOT_FORCE_COW, &root->state); clear_bit(BTRFS_ROOT_FORCE_COW, &root->state);
smp_mb__after_clear_bit(); smp_mb__after_atomic();
if (root->commit_root != root->node) { if (root->commit_root != root->node) {
list_add_tail(&root->dirty_list, list_add_tail(&root->dirty_list,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment