aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-02-20 05:08:55 -0500
committerJosef Bacik <jbacik@fb.com>2014-03-10 15:16:41 -0400
commit7483e1a4464999c72b231af0efe39cb31fd73f14 (patch)
treea9e5db4bb0cdd568002b735aa795109e9f9d4f32 /fs/btrfs/tree-log.c
parente87ac1368700af66c295afa47e5c7df0d9d8b919 (diff)
Btrfs: remove unnecessary memory barrier in btrfs_sync_log()
Mutex unlock implies certain memory barriers to make sure all the memory operation completes before the unlock, and the next mutex lock implies memory barriers to make sure the all the memory happens after the lock. So it is a full memory barrier(smp_mb), we needn't add memory barriers. Remove them. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index ca960ad271fe..285c168391f3 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2496,7 +2496,6 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
2496 root->log_transid++; 2496 root->log_transid++;
2497 log->log_transid = root->log_transid; 2497 log->log_transid = root->log_transid;
2498 root->log_start_pid = 0; 2498 root->log_start_pid = 0;
2499 smp_mb();
2500 /* 2499 /*
2501 * IO has been started, blocks of the log tree have WRITTEN flag set 2500 * IO has been started, blocks of the log tree have WRITTEN flag set
2502 * in their headers. new modifications of the log will be written to 2501 * in their headers. new modifications of the log will be written to
@@ -2589,8 +2588,6 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
2589 btrfs_header_level(log_root_tree->node)); 2588 btrfs_header_level(log_root_tree->node));
2590 2589
2591 log_root_tree->log_transid++; 2590 log_root_tree->log_transid++;
2592 smp_mb();
2593
2594 mutex_unlock(&log_root_tree->log_mutex); 2591 mutex_unlock(&log_root_tree->log_mutex);
2595 2592
2596 /* 2593 /*