Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1260509 > unrolled thread

[PATCH] md/raid5: remove redundant check in stripe_add_to_batch_list()

Started byRoman Gushchin <klamm@yandex-team.ru>
First post2015-11-02 11:10 +0100
Last post2015-11-06 01:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] md/raid5: remove redundant check in stripe_add_to_batch_list() Roman Gushchin <klamm@yandex-team.ru> - 2015-11-02 11:10 +0100
    Re: [PATCH] md/raid5: remove redundant check in stripe_add_to_batch_list() Neil Brown <neilb@suse.com> - 2015-11-06 01:50 +0100

#1260509 — [PATCH] md/raid5: remove redundant check in stripe_add_to_batch_list()

FromRoman Gushchin <klamm@yandex-team.ru>
Date2015-11-02 11:10 +0100
Subject[PATCH] md/raid5: remove redundant check in stripe_add_to_batch_list()
Message-ID<qqkdQ-42a-25@gated-at.bofh.it>
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 <klamm@yandex-team.ru>
Cc: Neil Brown <neilb@suse.com>
Cc: linux-raid@vger.kernel.org
---
 drivers/md/raid5.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 45933c1..f829ebc 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -768,8 +768,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))
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1263662

FromNeil Brown <neilb@suse.com>
Date2015-11-06 01:50 +0100
Message-ID<qrDo6-5L5-5@gated-at.bofh.it>
In reply to#1260509

[Multipart message — attachments visible in raw view] — view raw

On Mon, Nov 02 2015, Roman Gushchin wrote:

> 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 <klamm@yandex-team.ru>
> Cc: Neil Brown <neilb@suse.com>
> Cc: linux-raid@vger.kernel.org
> ---
>  drivers/md/raid5.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 45933c1..f829ebc 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -768,8 +768,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))
> -- 
> 2.4.3

applied, thanks.

(for future reference, public mailing lists like linux-raid aren't
usually mentioned on a 'Cc:' line in a patch.
Documentation/SubmittingPatches suggests:

  If a person has had the opportunity to comment on a patch, but has not
  provided such comments, you may optionally add a "Cc:" tag to the patch.
  This is the only tag which might be added without an explicit action by the
  person it names - but it should indicate that this person was copied on the
  patch.  This tag documents that potentially interested parties
  have been included in the discussion.

so it is primarily for third-party individuals
)

Thanks,
NeilBrown

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web