[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180307124712.14963-3-tvrtko.ursulin@linux.intel.com>
Date: Wed, 7 Mar 2018 12:47:08 +0000
From: Tvrtko Ursulin <tursulin@...ulin.net>
To: linux-kernel@...r.kernel.org
Cc: Tvrtko Ursulin <tvrtko.ursulin@...el.com>,
Bart Van Assche <bart.vanassche@....com>,
Hannes Reinecke <hare@...e.com>,
Johannes Thumshirn <jthumshirn@...e.de>,
Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 2/6] lib/scatterlist: Skip requesting zeroed allocations in sgl_alloc_order
From: Tvrtko Ursulin <tvrtko.ursulin@...el.com>
sg_init_table will clear the allocated block so requesting zeroed memory
from the allocator is redundant.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@...el.com>
Cc: Bart Van Assche <bart.vanassche@....com>
Cc: Hannes Reinecke <hare@...e.com>
Cc: Johannes Thumshirn <jthumshirn@...e.de>
Cc: Jens Axboe <axboe@...nel.dk>
---
lib/scatterlist.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index d61c025e38b4..9884be50a2c0 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -511,8 +511,7 @@ struct scatterlist *sgl_alloc_order(unsigned long length, unsigned int order,
nent++;
}
- sgl = kmalloc_array(nent, sizeof(struct scatterlist),
- (gfp & ~GFP_DMA) | __GFP_ZERO);
+ sgl = kmalloc_array(nent, sizeof(struct scatterlist), (gfp & ~GFP_DMA));
if (!sgl)
return NULL;
--
2.14.1
Powered by blists - more mailing lists