Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / fs / btrfs / async-thread.c
index fbd76ded9a34b3260a5e794115fff0312b3c6e08..df9932b00d08fdc666f63c84014fbd08889cf624 100644 (file)
@@ -74,6 +74,7 @@ BTRFS_WORK_HELPER(endio_helper);
 BTRFS_WORK_HELPER(endio_meta_helper);
 BTRFS_WORK_HELPER(endio_meta_write_helper);
 BTRFS_WORK_HELPER(endio_raid56_helper);
+BTRFS_WORK_HELPER(endio_repair_helper);
 BTRFS_WORK_HELPER(rmw_helper);
 BTRFS_WORK_HELPER(endio_write_helper);
 BTRFS_WORK_HELPER(freespace_write_helper);
@@ -86,12 +87,12 @@ BTRFS_WORK_HELPER(scrubwrc_helper);
 BTRFS_WORK_HELPER(scrubnc_helper);
 
 static struct __btrfs_workqueue *
-__btrfs_alloc_workqueue(const char *name, int flags, int max_active,
+__btrfs_alloc_workqueue(const char *name, unsigned int flags, int max_active,
                         int thresh)
 {
        struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS);
 
-       if (unlikely(!ret))
+       if (!ret)
                return NULL;
 
        ret->max_active = max_active;
@@ -115,7 +116,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active,
                ret->normal_wq = alloc_workqueue("%s-%s", flags,
                                                 ret->max_active, "btrfs",
                                                 name);
-       if (unlikely(!ret->normal_wq)) {
+       if (!ret->normal_wq) {
                kfree(ret);
                return NULL;
        }
@@ -131,18 +132,18 @@ static inline void
 __btrfs_destroy_workqueue(struct __btrfs_workqueue *wq);
 
 struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name,
-                                             int flags,
+                                             unsigned int flags,
                                              int max_active,
                                              int thresh)
 {
        struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS);
 
-       if (unlikely(!ret))
+       if (!ret)
                return NULL;
 
        ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI,
                                              max_active, thresh);
-       if (unlikely(!ret->normal)) {
+       if (!ret->normal) {
                kfree(ret);
                return NULL;
        }
@@ -150,7 +151,7 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name,
        if (flags & WQ_HIGHPRI) {
                ret->high = __btrfs_alloc_workqueue(name, flags, max_active,
                                                    thresh);
-               if (unlikely(!ret->high)) {
+               if (!ret->high) {
                        __btrfs_destroy_workqueue(ret->normal);
                        kfree(ret);
                        return NULL;