md/raid5: fix init_stripe() inconsistencies
authorMarkus Stockhausen <stockhausen@collogia.de>
Sat, 23 Aug 2014 10:19:27 +0000 (20:19 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 14 Oct 2014 02:08:28 +0000 (13:08 +1100)
raid5: fix init_stripe() inconsistencies

1) remove_hash() is not necessary. We will only be called right after
   get_free_stripe(). There we have already a call to remove_hash().

2) Tracing prints out the sector of the freed stripe and not the sector
   that we want to initialize.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c

index b177cc4c111eeaf13cd2f810422c47712cfc0b8b..741134d429a4895ef2d526e03b7cc2ab7d9bebc2 100644 (file)
@@ -531,9 +531,7 @@ 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);
-
-       remove_hash(sh);
+               (unsigned long long)sector);
 retry:
        seq = read_seqcount_begin(&conf->gen_lock);
        sh->generation = conf->generation - previous;