Skip to content

Commit a81b747

Browse files
committed
btrfs: raid56: use new helper for async_scrub_parity
Signed-off-by: David Sterba <[email protected]>
1 parent e66d8d5 commit a81b747

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

fs/btrfs/raid56.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static int alloc_rbio_pages(struct btrfs_raid_bio *rbio);
170170

171171
static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
172172
int need_check);
173-
static void async_scrub_parity(struct btrfs_raid_bio *rbio);
173+
static void scrub_parity_work(struct btrfs_work *work);
174174

175175
static void start_async_work(struct btrfs_raid_bio *rbio, btrfs_func_t work_func)
176176
{
@@ -812,7 +812,7 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
812812
start_async_work(next, rmw_work);
813813
} else if (next->operation == BTRFS_RBIO_PARITY_SCRUB) {
814814
steal_rbio(rbio, next);
815-
async_scrub_parity(next);
815+
start_async_work(next, scrub_parity_work);
816816
}
817817

818818
goto done_nolock;
@@ -2703,18 +2703,10 @@ static void scrub_parity_work(struct btrfs_work *work)
27032703
raid56_parity_scrub_stripe(rbio);
27042704
}
27052705

2706-
static void async_scrub_parity(struct btrfs_raid_bio *rbio)
2707-
{
2708-
btrfs_init_work(&rbio->work, btrfs_rmw_helper,
2709-
scrub_parity_work, NULL, NULL);
2710-
2711-
btrfs_queue_work(rbio->fs_info->rmw_workers, &rbio->work);
2712-
}
2713-
27142706
void raid56_parity_submit_scrub_rbio(struct btrfs_raid_bio *rbio)
27152707
{
27162708
if (!lock_stripe_add(rbio))
2717-
async_scrub_parity(rbio);
2709+
start_async_work(rbio, scrub_parity_work);
27182710
}
27192711

27202712
/* The following code is used for dev replace of a missing RAID 5/6 device. */

0 commit comments

Comments
 (0)