diff options
Diffstat (limited to 'fs/btrfs/async-thread.c')
-rw-r--r-- | fs/btrfs/async-thread.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index fbd76ded9a34..4dabeb893b7c 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -74,6 +74,7 @@ BTRFS_WORK_HELPER(endio_helper); | |||
74 | BTRFS_WORK_HELPER(endio_meta_helper); | 74 | BTRFS_WORK_HELPER(endio_meta_helper); |
75 | BTRFS_WORK_HELPER(endio_meta_write_helper); | 75 | BTRFS_WORK_HELPER(endio_meta_write_helper); |
76 | BTRFS_WORK_HELPER(endio_raid56_helper); | 76 | BTRFS_WORK_HELPER(endio_raid56_helper); |
77 | BTRFS_WORK_HELPER(endio_repair_helper); | ||
77 | BTRFS_WORK_HELPER(rmw_helper); | 78 | BTRFS_WORK_HELPER(rmw_helper); |
78 | BTRFS_WORK_HELPER(endio_write_helper); | 79 | BTRFS_WORK_HELPER(endio_write_helper); |
79 | BTRFS_WORK_HELPER(freespace_write_helper); | 80 | BTRFS_WORK_HELPER(freespace_write_helper); |
@@ -91,7 +92,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, | |||
91 | { | 92 | { |
92 | struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); | 93 | struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); |
93 | 94 | ||
94 | if (unlikely(!ret)) | 95 | if (!ret) |
95 | return NULL; | 96 | return NULL; |
96 | 97 | ||
97 | ret->max_active = max_active; | 98 | ret->max_active = max_active; |
@@ -115,7 +116,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, | |||
115 | ret->normal_wq = alloc_workqueue("%s-%s", flags, | 116 | ret->normal_wq = alloc_workqueue("%s-%s", flags, |
116 | ret->max_active, "btrfs", | 117 | ret->max_active, "btrfs", |
117 | name); | 118 | name); |
118 | if (unlikely(!ret->normal_wq)) { | 119 | if (!ret->normal_wq) { |
119 | kfree(ret); | 120 | kfree(ret); |
120 | return NULL; | 121 | return NULL; |
121 | } | 122 | } |
@@ -137,12 +138,12 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, | |||
137 | { | 138 | { |
138 | struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); | 139 | struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); |
139 | 140 | ||
140 | if (unlikely(!ret)) | 141 | if (!ret) |
141 | return NULL; | 142 | return NULL; |
142 | 143 | ||
143 | ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI, | 144 | ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI, |
144 | max_active, thresh); | 145 | max_active, thresh); |
145 | if (unlikely(!ret->normal)) { | 146 | if (!ret->normal) { |
146 | kfree(ret); | 147 | kfree(ret); |
147 | return NULL; | 148 | return NULL; |
148 | } | 149 | } |
@@ -150,7 +151,7 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, | |||
150 | if (flags & WQ_HIGHPRI) { | 151 | if (flags & WQ_HIGHPRI) { |
151 | ret->high = __btrfs_alloc_workqueue(name, flags, max_active, | 152 | ret->high = __btrfs_alloc_workqueue(name, flags, max_active, |
152 | thresh); | 153 | thresh); |
153 | if (unlikely(!ret->high)) { | 154 | if (!ret->high) { |
154 | __btrfs_destroy_workqueue(ret->normal); | 155 | __btrfs_destroy_workqueue(ret->normal); |
155 | kfree(ret); | 156 | kfree(ret); |
156 | return NULL; | 157 | return NULL; |