提交 7c27213b 编写于 作者: M Mikulas Patocka 提交者: Alasdair G Kergon

dm raid1: remove impossible mempool_alloc error test

mempool_alloc can't fail if __GFP_WAIT is specified, so the condition
that tests if read_record is non-NULL is always true.
Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 018debea
...@@ -1195,11 +1195,9 @@ static int mirror_map(struct dm_target *ti, struct bio *bio, ...@@ -1195,11 +1195,9 @@ static int mirror_map(struct dm_target *ti, struct bio *bio,
return -EIO; return -EIO;
read_record = mempool_alloc(ms->read_record_pool, GFP_NOIO); read_record = mempool_alloc(ms->read_record_pool, GFP_NOIO);
if (likely(read_record)) { dm_bio_record(&read_record->details, bio);
dm_bio_record(&read_record->details, bio); map_context->ptr = read_record;
map_context->ptr = read_record; read_record->m = m;
read_record->m = m;
}
map_bio(m, bio); map_bio(m, bio);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册