Commit 0ec31a61f0d46e03e9e80c2ff57fa3ae2fdf92d3
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge branch 'remove-unlikely' of git://git.kernel.org/pub/scm/linux/kernel/git/…
…kdave/linux into for-linus
Showing 6 changed files Side-by-side Diff
fs/btrfs/async-thread.c
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 | { |
93 | 93 | struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); |
94 | 94 | |
95 | - if (unlikely(!ret)) | |
95 | + if (!ret) | |
96 | 96 | return NULL; |
97 | 97 | |
98 | 98 | ret->max_active = max_active; |
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | ret->normal_wq = alloc_workqueue("%s-%s", flags, |
117 | 117 | ret->max_active, "btrfs", |
118 | 118 | name); |
119 | - if (unlikely(!ret->normal_wq)) { | |
119 | + if (!ret->normal_wq) { | |
120 | 120 | kfree(ret); |
121 | 121 | return NULL; |
122 | 122 | } |
123 | 123 | |
... | ... | @@ -138,12 +138,12 @@ |
138 | 138 | { |
139 | 139 | struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); |
140 | 140 | |
141 | - if (unlikely(!ret)) | |
141 | + if (!ret) | |
142 | 142 | return NULL; |
143 | 143 | |
144 | 144 | ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI, |
145 | 145 | max_active, thresh); |
146 | - if (unlikely(!ret->normal)) { | |
146 | + if (!ret->normal) { | |
147 | 147 | kfree(ret); |
148 | 148 | return NULL; |
149 | 149 | } |
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 | if (flags & WQ_HIGHPRI) { |
152 | 152 | ret->high = __btrfs_alloc_workqueue(name, flags, max_active, |
153 | 153 | thresh); |
154 | - if (unlikely(!ret->high)) { | |
154 | + if (!ret->high) { | |
155 | 155 | __btrfs_destroy_workqueue(ret->normal); |
156 | 156 | kfree(ret); |
157 | 157 | return NULL; |
fs/btrfs/extent-tree.c
... | ... | @@ -9690,7 +9690,7 @@ |
9690 | 9690 | |
9691 | 9691 | int btrfs_start_nocow_write(struct btrfs_root *root) |
9692 | 9692 | { |
9693 | - if (unlikely(atomic_read(&root->will_be_snapshoted))) | |
9693 | + if (atomic_read(&root->will_be_snapshoted)) | |
9694 | 9694 | return 0; |
9695 | 9695 | |
9696 | 9696 | percpu_counter_inc(&root->subv_writers->counter); |
... | ... | @@ -9698,7 +9698,7 @@ |
9698 | 9698 | * Make sure counter is updated before we check for snapshot creation. |
9699 | 9699 | */ |
9700 | 9700 | smp_mb(); |
9701 | - if (unlikely(atomic_read(&root->will_be_snapshoted))) { | |
9701 | + if (atomic_read(&root->will_be_snapshoted)) { | |
9702 | 9702 | btrfs_end_nocow_write(root); |
9703 | 9703 | return 0; |
9704 | 9704 | } |
fs/btrfs/file.c
... | ... | @@ -452,7 +452,7 @@ |
452 | 452 | if (unlikely(copied == 0)) |
453 | 453 | break; |
454 | 454 | |
455 | - if (unlikely(copied < PAGE_CACHE_SIZE - offset)) { | |
455 | + if (copied < PAGE_CACHE_SIZE - offset) { | |
456 | 456 | offset += copied; |
457 | 457 | } else { |
458 | 458 | pg++; |
... | ... | @@ -1792,7 +1792,7 @@ |
1792 | 1792 | if (sync) |
1793 | 1793 | atomic_inc(&BTRFS_I(inode)->sync_writers); |
1794 | 1794 | |
1795 | - if (unlikely(file->f_flags & O_DIRECT)) { | |
1795 | + if (file->f_flags & O_DIRECT) { | |
1796 | 1796 | num_written = __btrfs_direct_write(iocb, from, pos); |
1797 | 1797 | } else { |
1798 | 1798 | num_written = __btrfs_buffered_write(file, from, pos); |
fs/btrfs/inode.c
... | ... | @@ -7803,9 +7803,9 @@ |
7803 | 7803 | atomic_inc(&dip->pending_bios); |
7804 | 7804 | |
7805 | 7805 | while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) { |
7806 | - if (unlikely(map_length < submit_len + bvec->bv_len || | |
7806 | + if (map_length < submit_len + bvec->bv_len || | |
7807 | 7807 | bio_add_page(bio, bvec->bv_page, bvec->bv_len, |
7808 | - bvec->bv_offset) < bvec->bv_len)) { | |
7808 | + bvec->bv_offset) < bvec->bv_len) { | |
7809 | 7809 | /* |
7810 | 7810 | * inc the count before we submit the bio so |
7811 | 7811 | * we know the end IO handler won't happen before |
... | ... | @@ -8018,8 +8018,8 @@ |
8018 | 8018 | ret = btrfs_delalloc_reserve_space(inode, count); |
8019 | 8019 | if (ret) |
8020 | 8020 | goto out; |
8021 | - } else if (unlikely(test_bit(BTRFS_INODE_READDIO_NEED_LOCK, | |
8022 | - &BTRFS_I(inode)->runtime_flags))) { | |
8021 | + } else if (test_bit(BTRFS_INODE_READDIO_NEED_LOCK, | |
8022 | + &BTRFS_I(inode)->runtime_flags)) { | |
8023 | 8023 | inode_dio_done(inode); |
8024 | 8024 | flags = DIO_LOCKING | DIO_SKIP_HOLES; |
8025 | 8025 | wakeup = false; |
... | ... | @@ -9014,7 +9014,7 @@ |
9014 | 9014 | spin_unlock(&root->delalloc_lock); |
9015 | 9015 | |
9016 | 9016 | work = btrfs_alloc_delalloc_work(inode, 0, delay_iput); |
9017 | - if (unlikely(!work)) { | |
9017 | + if (!work) { | |
9018 | 9018 | if (delay_iput) |
9019 | 9019 | btrfs_add_delayed_iput(inode); |
9020 | 9020 | else |
fs/btrfs/ioctl.c
fs/btrfs/transaction.c