aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2023-01-16 15:04:12 +0800
committerDavid Sterba <[email protected]>2023-04-17 18:01:16 +0200
commit1d40329736907587ac5995d2d4b3263759ff84e3 (patch)
tree186288c444186e0c8b3cd86ee8776b703e427da9
parent5f50fa918f0c1740eb294f9ed532e26a7f1d0cb4 (diff)
btrfs: scrub: remove unused path inside scrub_stripe()
The variable @path is no longer passed into any call sites after commit 18d30ab96149 ("btrfs: scrub: use scrub_simple_mirror() to handle RAID56 data stripe scrub"), thus we can remove the variable completely. Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
-rw-r--r--fs/btrfs/scrub.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index c83ac6b80c2f..3076e585c05f 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3707,7 +3707,6 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
struct btrfs_device *scrub_dev,
int stripe_index)
{
- struct btrfs_path *path;
struct btrfs_fs_info *fs_info = sctx->fs_info;
struct btrfs_root *root;
struct btrfs_root *csum_root;
@@ -3729,19 +3728,6 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
u64 stripe_end;
int stop_loop = 0;
- path = btrfs_alloc_path();
- if (!path)
- return -ENOMEM;
-
- /*
- * work on commit root. The related disk blocks are static as
- * long as COW is applied. This means, it is save to rewrite
- * them to repair disk errors without any race conditions
- */
- path->search_commit_root = 1;
- path->skip_locking = 1;
- path->reada = READA_FORWARD;
-
wait_event(sctx->list_wait,
atomic_read(&sctx->bios_in_flight) == 0);
scrub_blocked_if_needed(fs_info);
@@ -3861,7 +3847,6 @@ out:
mutex_unlock(&sctx->wr_lock);
blk_finish_plug(&plug);
- btrfs_free_path(path);
if (sctx->is_dev_replace && ret >= 0) {
int ret2;