diff options
author | David Sterba <dsterba@suse.cz> | 2014-09-29 13:20:37 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-02 10:06:19 -0400 |
commit | 5d99a998f375b7bff7ddff0162a6eed4d4ca1318 (patch) | |
tree | 29b629d44ad9001fd7d8d283e4a9c4f6164747d0 /fs/btrfs | |
parent | 1d52c78afbbf80b58299e076a159617d6b42fe3c (diff) |
btrfs: remove unlikely from NULL checks
Unlikely is implicit for NULL checks of pointers.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/async-thread.c | 10 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 2da0a66790ba..4dabeb893b7c 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -92,7 +92,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, | |||
92 | { | 92 | { |
93 | struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); | 93 | struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); |
94 | 94 | ||
95 | if (unlikely(!ret)) | 95 | if (!ret) |
96 | return NULL; | 96 | return NULL; |
97 | 97 | ||
98 | ret->max_active = max_active; | 98 | ret->max_active = max_active; |
@@ -116,7 +116,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, | |||
116 | ret->normal_wq = alloc_workqueue("%s-%s", flags, | 116 | ret->normal_wq = alloc_workqueue("%s-%s", flags, |
117 | ret->max_active, "btrfs", | 117 | ret->max_active, "btrfs", |
118 | name); | 118 | name); |
119 | if (unlikely(!ret->normal_wq)) { | 119 | if (!ret->normal_wq) { |
120 | kfree(ret); | 120 | kfree(ret); |
121 | return NULL; | 121 | return NULL; |
122 | } | 122 | } |
@@ -138,12 +138,12 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, | |||
138 | { | 138 | { |
139 | struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); | 139 | struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); |
140 | 140 | ||
141 | if (unlikely(!ret)) | 141 | if (!ret) |
142 | return NULL; | 142 | return NULL; |
143 | 143 | ||
144 | ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI, | 144 | ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI, |
145 | max_active, thresh); | 145 | max_active, thresh); |
146 | if (unlikely(!ret->normal)) { | 146 | if (!ret->normal) { |
147 | kfree(ret); | 147 | kfree(ret); |
148 | return NULL; | 148 | return NULL; |
149 | } | 149 | } |
@@ -151,7 +151,7 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, | |||
151 | if (flags & WQ_HIGHPRI) { | 151 | if (flags & WQ_HIGHPRI) { |
152 | ret->high = __btrfs_alloc_workqueue(name, flags, max_active, | 152 | ret->high = __btrfs_alloc_workqueue(name, flags, max_active, |
153 | thresh); | 153 | thresh); |
154 | if (unlikely(!ret->high)) { | 154 | if (!ret->high) { |
155 | __btrfs_destroy_workqueue(ret->normal); | 155 | __btrfs_destroy_workqueue(ret->normal); |
156 | kfree(ret); | 156 | kfree(ret); |
157 | return NULL; | 157 | return NULL; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 344a322eb386..998e67fdf2f6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -9013,7 +9013,7 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, | |||
9013 | spin_unlock(&root->delalloc_lock); | 9013 | spin_unlock(&root->delalloc_lock); |
9014 | 9014 | ||
9015 | work = btrfs_alloc_delalloc_work(inode, 0, delay_iput); | 9015 | work = btrfs_alloc_delalloc_work(inode, 0, delay_iput); |
9016 | if (unlikely(!work)) { | 9016 | if (!work) { |
9017 | if (delay_iput) | 9017 | if (delay_iput) |
9018 | btrfs_add_delayed_iput(inode); | 9018 | btrfs_add_delayed_iput(inode); |
9019 | else | 9019 | else |