Skip to content

Commit 27a4ff8

Browse files
GuoqingJiangshligit
authored andcommitted
raid5: remove raid5_build_block
Now raid5_build_block is just called to set the sector of r5dev, raid5_compute_blocknr can be used directly for the purpose. Signed-off-by: Guoqing Jiang <[email protected]> Signed-off-by: Shaohua Li <[email protected]>
1 parent a72cbf8 commit 27a4ff8

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/md/raid5.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ static int grow_buffers(struct stripe_head *sh, gfp_t gfp)
494494
return 0;
495495
}
496496

497-
static void raid5_build_block(struct stripe_head *sh, int i, int previous);
498497
static void stripe_set_idx(sector_t stripe, struct r5conf *conf, int previous,
499498
struct stripe_head *sh);
500499

@@ -530,7 +529,7 @@ static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
530529
WARN_ON(1);
531530
}
532531
dev->flags = 0;
533-
raid5_build_block(sh, i, previous);
532+
dev->sector = raid5_compute_blocknr(sh, i, previous);
534533
}
535534
if (read_seqcount_retry(&conf->gen_lock, seq))
536535
goto retry;
@@ -2662,14 +2661,6 @@ static void raid5_end_write_request(struct bio *bi)
26622661
raid5_release_stripe(sh->batch_head);
26632662
}
26642663

2665-
static void raid5_build_block(struct stripe_head *sh, int i, int previous)
2666-
{
2667-
struct r5dev *dev = &sh->dev[i];
2668-
2669-
dev->flags = 0;
2670-
dev->sector = raid5_compute_blocknr(sh, i, previous);
2671-
}
2672-
26732664
static void raid5_error(struct mddev *mddev, struct md_rdev *rdev)
26742665
{
26752666
char b[BDEVNAME_SIZE];

0 commit comments

Comments
 (0)