]> git.baikalelectronics.ru Git - kernel.git/commitdiff
dm raid1: remove impossible mempool_alloc error test
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 21 Dec 2012 20:23:32 +0000 (20:23 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 21 Dec 2012 20:23:32 +0000 (20:23 +0000)
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: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-raid1.c

index fd61f98ee1f68af3085297afc0b1c46dc0899e2f..b37467618b16464d9de8b216ffa433b233d176f8 100644 (file)
@@ -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;
-       }
+       dm_bio_record(&read_record->details, bio);
+       map_context->ptr = read_record;
+       read_record->m = m;
 
        map_bio(m, bio);