提交 ab05613a 编写于 作者: M majianpeng 提交者: NeilBrown

md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.

This bug was introduced by commit(v3.0-rc7-126-g2230dfe4).
So fix is suitable for 3.0.y thru 3.6.y.

Cc: stable@vger.kernel.org
Signed-off-by: NJianpeng Ma <majianpeng@gmail.com>
Signed-off-by: NNeilBrown <neilb@suse.de>
上级 ed30be07
......@@ -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'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册