From: Roman Gushchin Date: Sun, 20 Dec 2015 23:50:59 +0000 (+1100) Subject: md/raid5: remove redundant check in stripe_add_to_batch_list() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b46020aa3a8a0f9c7324fe0af4aec4227f947a10;p=deliverable%2Flinux.git md/raid5: remove redundant check in stripe_add_to_batch_list() The stripe_add_to_batch_list() function is called only if stripe_can_batch() returned true, so there is no need for double check. Signed-off-by: Roman Gushchin Cc: Neil Brown Cc: linux-raid@vger.kernel.org Signed-off-by: NeilBrown --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 704ef7fcfbf8..22362505f810 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -772,8 +772,6 @@ static void stripe_add_to_batch_list(struct r5conf *conf, struct stripe_head *sh int hash; int dd_idx; - if (!stripe_can_batch(sh)) - return; /* Don't cross chunks, so stripe pd_idx/qd_idx is the same */ tmp_sec = sh->sector; if (!sector_div(tmp_sec, conf->chunk_sectors))