diff options
Diffstat (limited to 'fs/btrfs/raid56.c')
| -rw-r--r-- | fs/btrfs/raid56.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 9af0b25d991a..4055291a523e 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c | |||
| @@ -1416,20 +1416,18 @@ cleanup: | |||
| 1416 | 1416 | ||
| 1417 | static void async_rmw_stripe(struct btrfs_raid_bio *rbio) | 1417 | static void async_rmw_stripe(struct btrfs_raid_bio *rbio) |
| 1418 | { | 1418 | { |
| 1419 | rbio->work.flags = 0; | 1419 | btrfs_init_work(&rbio->work, rmw_work, NULL, NULL); |
| 1420 | rbio->work.func = rmw_work; | ||
| 1421 | 1420 | ||
| 1422 | btrfs_queue_worker(&rbio->fs_info->rmw_workers, | 1421 | btrfs_queue_work(rbio->fs_info->rmw_workers, |
| 1423 | &rbio->work); | 1422 | &rbio->work); |
| 1424 | } | 1423 | } |
| 1425 | 1424 | ||
| 1426 | static void async_read_rebuild(struct btrfs_raid_bio *rbio) | 1425 | static void async_read_rebuild(struct btrfs_raid_bio *rbio) |
| 1427 | { | 1426 | { |
| 1428 | rbio->work.flags = 0; | 1427 | btrfs_init_work(&rbio->work, read_rebuild_work, NULL, NULL); |
| 1429 | rbio->work.func = read_rebuild_work; | ||
| 1430 | 1428 | ||
| 1431 | btrfs_queue_worker(&rbio->fs_info->rmw_workers, | 1429 | btrfs_queue_work(rbio->fs_info->rmw_workers, |
| 1432 | &rbio->work); | 1430 | &rbio->work); |
| 1433 | } | 1431 | } |
| 1434 | 1432 | ||
| 1435 | /* | 1433 | /* |
| @@ -1667,10 +1665,9 @@ static void btrfs_raid_unplug(struct blk_plug_cb *cb, bool from_schedule) | |||
| 1667 | plug = container_of(cb, struct btrfs_plug_cb, cb); | 1665 | plug = container_of(cb, struct btrfs_plug_cb, cb); |
| 1668 | 1666 | ||
| 1669 | if (from_schedule) { | 1667 | if (from_schedule) { |
| 1670 | plug->work.flags = 0; | 1668 | btrfs_init_work(&plug->work, unplug_work, NULL, NULL); |
| 1671 | plug->work.func = unplug_work; | 1669 | btrfs_queue_work(plug->info->rmw_workers, |
| 1672 | btrfs_queue_worker(&plug->info->rmw_workers, | 1670 | &plug->work); |
| 1673 | &plug->work); | ||
| 1674 | return; | 1671 | return; |
| 1675 | } | 1672 | } |
| 1676 | run_plug(plug); | 1673 | run_plug(plug); |
