提交 e03f1a84 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

dm-raid1.c: fix NULL dereferences

This patch fixes two NULL dereferences introduced by commit
06386bbf and spotted by the Coverity
checker.
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 ae5e1b6c
...@@ -1695,14 +1695,15 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, ...@@ -1695,14 +1695,15 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio,
* information for a retry or there was no other * information for a retry or there was no other
* mirror in-sync. * mirror in-sync.
*/ */
DMERR_LIMIT("Mirror read failed from %s.", DMERR_LIMIT("Mirror read failed.");
m->dev->name);
return -EIO; return -EIO;
} }
m = read_record->m;
DMERR("Mirror read failed from %s. Trying alternative device.", DMERR("Mirror read failed from %s. Trying alternative device.",
m->dev->name); m->dev->name);
m = read_record->m;
fail_mirror(m, DM_RAID1_READ_ERROR); fail_mirror(m, DM_RAID1_READ_ERROR);
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册