From: NeilBrown <neilb@suse.de>
To: majianpeng <majianpeng@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>,
zhuwenfeng <zhuwenfeng@kedacom.com>
Subject: Re: [PATCH 2/2] md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.
Date: Tue, 6 Nov 2012 21:19:07 +1100 [thread overview]
Message-ID: <20121106211907.7df50c4a@notabene.brown> (raw)
In-Reply-To: <201211061713404301164@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
On Tue, 6 Nov 2012 17:13:44 +0800 majianpeng <majianpeng@gmail.com> wrote:
> This bug was introduced by commit(v3.0-rc7-126-g2230dfe).
> So fix is suitable for 3.0.y thru 3.6.y.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> drivers/md/md.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index d63aa78..541c74c 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -7936,9 +7936,9 @@ int md_is_badblock(struct badblocks *bb, sector_t s, int sectors,
> sector_t *first_bad, int *bad_sectors)
> {
> int hi;
> - int lo = 0;
> + int lo;
> u64 *p = bb->page;
> - int rv = 0;
> + int rv;
> sector_t target = s + sectors;
> unsigned seq;
>
> @@ -7953,7 +7953,8 @@ int md_is_badblock(struct badblocks *bb, sector_t s, int sectors,
>
> retry:
> seq = read_seqbegin(&bb->lock);
> -
> + lo = 0;
> + rv = 0;
> hi = bb->count;
>
> /* Binary search between lo and hi for 'target'
Applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2012-11-06 10:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-06 9:13 [PATCH 2/2] md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock majianpeng
2012-11-06 10:19 ` NeilBrown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121106211907.7df50c4a@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=majianpeng@gmail.com \
--cc=zhuwenfeng@kedacom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).