diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-07-17 07:03:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:02 -0400 |
commit | 94f6030ca792c57422f04a73e7a872d8325946d3 (patch) | |
tree | 0197f24d82b1706f1b0521f2cf68feeff64123df /block/ll_rw_blk.c | |
parent | 81cda6626178cd55297831296ba8ecedbfd8b52d (diff) |
Slab allocators: Replace explicit zeroing with __GFP_ZERO
kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing
variant in the past. But with __GFP_ZERO it is possible now to do zeroing
while allocating.
Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever
we can.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r-- | block/ll_rw_blk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 11e4235d0b0c..d7cadf304168 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -1829,11 +1829,11 @@ request_queue_t *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) | |||
1829 | { | 1829 | { |
1830 | request_queue_t *q; | 1830 | request_queue_t *q; |
1831 | 1831 | ||
1832 | q = kmem_cache_alloc_node(requestq_cachep, gfp_mask, node_id); | 1832 | q = kmem_cache_alloc_node(requestq_cachep, |
1833 | gfp_mask | __GFP_ZERO, node_id); | ||
1833 | if (!q) | 1834 | if (!q) |
1834 | return NULL; | 1835 | return NULL; |
1835 | 1836 | ||
1836 | memset(q, 0, sizeof(*q)); | ||
1837 | init_timer(&q->unplug_timer); | 1837 | init_timer(&q->unplug_timer); |
1838 | 1838 | ||
1839 | snprintf(q->kobj.name, KOBJ_NAME_LEN, "%s", "queue"); | 1839 | snprintf(q->kobj.name, KOBJ_NAME_LEN, "%s", "queue"); |