summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorDavid Sterba2014-09-30 01:33:33 +0200
committerDavid Sterba2014-10-02 16:15:21 +0200
commitee39b432b4ac083acdafd7b4f156283722e3bf14 (patch)
treed74c00763ec0145fe39d01e45a47cf0b550099ca /fs/btrfs/extent-tree.c
parentbtrfs: remove unlikely from NULL checks (diff)
downloadkernel-qcow2-linux-ee39b432b4ac083acdafd7b4f156283722e3bf14.tar.gz
kernel-qcow2-linux-ee39b432b4ac083acdafd7b4f156283722e3bf14.tar.xz
kernel-qcow2-linux-ee39b432b4ac083acdafd7b4f156283722e3bf14.zip
btrfs: remove unlikely from data-dependent branches and slow paths
There are the branch hints that obviously depend on the data being processed, the CPU predictor will do better job according to the actual load. It also does not make sense to use the hints in slow paths that do a lot of other operations like locking, waiting or IO. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 44d04979f071..ede740bfaac0 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -9694,7 +9694,7 @@ void btrfs_end_nocow_write(struct btrfs_root *root)
int btrfs_start_nocow_write(struct btrfs_root *root)
{
- if (unlikely(atomic_read(&root->will_be_snapshoted)))
+ if (atomic_read(&root->will_be_snapshoted))
return 0;
percpu_counter_inc(&root->subv_writers->counter);
@@ -9702,7 +9702,7 @@ int btrfs_start_nocow_write(struct btrfs_root *root)
* Make sure counter is updated before we check for snapshot creation.
*/
smp_mb();
- if (unlikely(atomic_read(&root->will_be_snapshoted))) {
+ if (atomic_read(&root->will_be_snapshoted)) {
btrfs_end_nocow_write(root);
return 0;
}