Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   dm-raid1: remove unused condition (http://www.linux-archive.org/device-mapper-development/712607-dm-raid1-remove-unused-condition.html)

Mikulas Patocka 10-15-2012 08:38 PM

dm-raid1: remove unused condition
 
dm-raid1: remove unused condition

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>

---
drivers/md/dm-raid1.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Index: linux-3.6.2-fast/drivers/md/dm-raid1.c
================================================== =================
--- linux-3.6.2-fast.orig/drivers/md/dm-raid1.c 2012-10-15 21:31:57.000000000 +0200
+++ linux-3.6.2-fast/drivers/md/dm-raid1.c 2012-10-15 21:34:20.000000000 +0200
@@ -1198,11 +1198,9 @@ static int mirror_map(struct dm_target *
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);


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 04:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.