There are two small bugs in func init_stripe():
1:pr_debug print error sector
2:Don't call remove_hash() because it called in get_free_stripe().
Signed-off-by: Jianpeng Ma <redacted>
---
drivers/md/raid5.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index adda94d..8b486b0 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -329,9 +329,8 @@ static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
BUG_ON(stripe_operations_active(sh));
pr_debug("init_stripe called, stripe %llu\n",
- (unsigned long long)sh->sector);
+ (unsigned long long)sector);
- remove_hash(sh);
sh->generation = conf->generation - previous;
sh->disks = previous ? conf->previous_raid_disks : conf->raid_disks;--
1.7.9.5