Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[cascardo/linux.git] / fs / btrfs / raid56.c
index 9af0b25..4055291 100644 (file)
@@ -1416,20 +1416,18 @@ cleanup:
 
 static void async_rmw_stripe(struct btrfs_raid_bio *rbio)
 {
-       rbio->work.flags = 0;
-       rbio->work.func = rmw_work;
+       btrfs_init_work(&rbio->work, rmw_work, NULL, NULL);
 
-       btrfs_queue_worker(&rbio->fs_info->rmw_workers,
-                          &rbio->work);
+       btrfs_queue_work(rbio->fs_info->rmw_workers,
+                        &rbio->work);
 }
 
 static void async_read_rebuild(struct btrfs_raid_bio *rbio)
 {
-       rbio->work.flags = 0;
-       rbio->work.func = read_rebuild_work;
+       btrfs_init_work(&rbio->work, read_rebuild_work, NULL, NULL);
 
-       btrfs_queue_worker(&rbio->fs_info->rmw_workers,
-                          &rbio->work);
+       btrfs_queue_work(rbio->fs_info->rmw_workers,
+                        &rbio->work);
 }
 
 /*
@@ -1667,10 +1665,9 @@ static void btrfs_raid_unplug(struct blk_plug_cb *cb, bool from_schedule)
        plug = container_of(cb, struct btrfs_plug_cb, cb);
 
        if (from_schedule) {
-               plug->work.flags = 0;
-               plug->work.func = unplug_work;
-               btrfs_queue_worker(&plug->info->rmw_workers,
-                                  &plug->work);
+               btrfs_init_work(&plug->work, unplug_work, NULL, NULL);
+               btrfs_queue_work(plug->info->rmw_workers,
+                                &plug->work);
                return;
        }
        run_plug(plug);