diff options
author | Matthew Dobson <colpatch@us.ibm.com> | 2006-03-26 04:37:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:00 -0500 |
commit | 93d2341c750cda0df48a6cc67b35fe25f1ec47df (patch) | |
tree | f098a3bbfae65ce967591ee94d605c6e6bea21c6 /net/sunrpc | |
parent | fec433aaaae32a02329ad7d71b0f3c91b7525077 (diff) |
[PATCH] mempool: use mempool_create_slab_pool()
Modify well over a dozen mempool users to call mempool_create_slab_pool()
rather than calling mempool_create() with extra arguments, saving about 30
lines of code and increasing readability.
Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/sched.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index b9969b91a9f7..5c3eee768504 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -1167,16 +1167,12 @@ rpc_init_mempool(void) | |||
1167 | NULL, NULL); | 1167 | NULL, NULL); |
1168 | if (!rpc_buffer_slabp) | 1168 | if (!rpc_buffer_slabp) |
1169 | goto err_nomem; | 1169 | goto err_nomem; |
1170 | rpc_task_mempool = mempool_create(RPC_TASK_POOLSIZE, | 1170 | rpc_task_mempool = mempool_create_slab_pool(RPC_TASK_POOLSIZE, |
1171 | mempool_alloc_slab, | 1171 | rpc_task_slabp); |
1172 | mempool_free_slab, | ||
1173 | rpc_task_slabp); | ||
1174 | if (!rpc_task_mempool) | 1172 | if (!rpc_task_mempool) |
1175 | goto err_nomem; | 1173 | goto err_nomem; |
1176 | rpc_buffer_mempool = mempool_create(RPC_BUFFER_POOLSIZE, | 1174 | rpc_buffer_mempool = mempool_create_slab_pool(RPC_BUFFER_POOLSIZE, |
1177 | mempool_alloc_slab, | 1175 | rpc_buffer_slabp); |
1178 | mempool_free_slab, | ||
1179 | rpc_buffer_slabp); | ||
1180 | if (!rpc_buffer_mempool) | 1176 | if (!rpc_buffer_mempool) |
1181 | goto err_nomem; | 1177 | goto err_nomem; |
1182 | return 0; | 1178 | return 0; |