Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c27213b authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Alasdair G Kergon
Browse files

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: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 018debea
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1195,11 +1195,9 @@ static int mirror_map(struct dm_target *ti, struct bio *bio,
		return -EIO;

	read_record = mempool_alloc(ms->read_record_pool, GFP_NOIO);
	if (likely(read_record)) {
	dm_bio_record(&read_record->details, bio);
	map_context->ptr = read_record;
	read_record->m = m;
	}

	map_bio(m, bio);