md/raid5-cache: do not need to set STRIPE_PREREAD_ACTIVE repeatedly
authorJackieLiu <liuyun01@kylinos.cn>
Tue, 29 Nov 2016 03:57:30 +0000 (11:57 +0800)
committerShaohua Li <shli@fb.com>
Tue, 29 Nov 2016 22:46:23 +0000 (14:46 -0800)
R5c_make_stripe_write_out has set this flag, do not need to set again.

Signed-off-by: JackieLiu <liuyun01@kylinos.cn>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5-cache.c

index a46f547..e786d4e 100644 (file)
@@ -1247,8 +1247,6 @@ static void r5c_flush_stripe(struct r5conf *conf, struct stripe_head *sh)
        atomic_inc(&conf->active_stripes);
        r5c_make_stripe_write_out(sh);
 
-       if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
-               atomic_inc(&conf->preread_active_stripes);
        raid5_release_stripe(sh);
 }