Skip to content

Commit

Permalink
btrfs: Remove len argument from scrub_find_csum
Browse files Browse the repository at this point in the history
It is useless.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Zhao Lei authored and Chris Mason committed Nov 11, 2015
1 parent affe4a5 commit 3b5753e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,8 +2446,7 @@ static void scrub_block_complete(struct scrub_block *sblock)
}
}

static int scrub_find_csum(struct scrub_ctx *sctx, u64 logical, u64 len,
u8 *csum)
static int scrub_find_csum(struct scrub_ctx *sctx, u64 logical, u8 *csum)
{
struct btrfs_ordered_sum *sum = NULL;
unsigned long index;
Expand Down Expand Up @@ -2511,7 +2510,7 @@ static int scrub_extent(struct scrub_ctx *sctx, u64 logical, u64 len,

if (flags & BTRFS_EXTENT_FLAG_DATA) {
/* push csums to sbio */
have_csum = scrub_find_csum(sctx, logical, l, csum);
have_csum = scrub_find_csum(sctx, logical, csum);
if (have_csum == 0)
++sctx->stat.no_csum;
if (sctx->is_dev_replace && !have_csum) {
Expand Down Expand Up @@ -2649,7 +2648,7 @@ static int scrub_extent_for_parity(struct scrub_parity *sparity,

if (flags & BTRFS_EXTENT_FLAG_DATA) {
/* push csums to sbio */
have_csum = scrub_find_csum(sctx, logical, l, csum);
have_csum = scrub_find_csum(sctx, logical, csum);
if (have_csum == 0)
goto skip;
}
Expand Down

0 comments on commit 3b5753e

Please sign in to comment.