FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 10-15-2012, 08:38 PM
Mikulas Patocka
 
Default 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
 

Thread Tools




All times are GMT. The time now is 04:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org