summaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-19 23:39:40 +0200
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 20:29:39 +0200
commitb5deef901282628d88c784f4c9d2f0583ec3b355 (patch)
tree1d3be92f18c9afd9426b06739c8f76931acbf03f /block/elevator.c
parent[PATCH] Kill various deprecated/unused block layer defines/functions (diff)
downloadlinux-b5deef901282628d88c784f4c9d2f0583ec3b355.tar.xz
linux-b5deef901282628d88c784f4c9d2f0583ec3b355.zip
[PATCH] Make sure all block/io scheduler setups are node aware
Some were kmalloc_node(), some were still kmalloc(). Change them all to kmalloc_node(). Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 788d2d81994c..e643291793a4 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -161,12 +161,12 @@ __setup("elevator=", elevator_setup);
static struct kobj_type elv_ktype;
-static elevator_t *elevator_alloc(struct elevator_type *e)
+static elevator_t *elevator_alloc(request_queue_t *q, struct elevator_type *e)
{
elevator_t *eq;
int i;
- eq = kmalloc(sizeof(elevator_t), GFP_KERNEL);
+ eq = kmalloc_node(sizeof(elevator_t), GFP_KERNEL, q->node);
if (unlikely(!eq))
goto err;
@@ -178,7 +178,8 @@ static elevator_t *elevator_alloc(struct elevator_type *e)
eq->kobj.ktype = &elv_ktype;
mutex_init(&eq->sysfs_lock);
- eq->hash = kmalloc(sizeof(struct hlist_head) * ELV_HASH_ENTRIES, GFP_KERNEL);
+ eq->hash = kmalloc_node(sizeof(struct hlist_head) * ELV_HASH_ENTRIES,
+ GFP_KERNEL, q->node);
if (!eq->hash)
goto err;
@@ -224,7 +225,7 @@ int elevator_init(request_queue_t *q, char *name)
e = elevator_get("noop");
}
- eq = elevator_alloc(e);
+ eq = elevator_alloc(q, e);
if (!eq)
return -ENOMEM;
@@ -987,7 +988,7 @@ static int elevator_switch(request_queue_t *q, struct elevator_type *new_e)
/*
* Allocate new elevator
*/
- e = elevator_alloc(new_e);
+ e = elevator_alloc(q, new_e);
if (!e)
return 0;