aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorMatthew Dobson <colpatch@us.ibm.com>2006-03-26 04:37:50 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:00 -0500
commit93d2341c750cda0df48a6cc67b35fe25f1ec47df (patch)
treef098a3bbfae65ce967591ee94d605c6e6bea21c6 /fs/cifs
parentfec433aaaae32a02329ad7d71b0f3c91b7525077 (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 'fs/cifs')
-rw-r--r--fs/cifs/cifsfs.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 221b3334b737..6b99b51d6694 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -738,10 +738,8 @@ cifs_init_request_bufs(void)
738 cERROR(1,("cifs_min_rcv set to maximum (64)")); 738 cERROR(1,("cifs_min_rcv set to maximum (64)"));
739 } 739 }
740 740
741 cifs_req_poolp = mempool_create(cifs_min_rcv, 741 cifs_req_poolp = mempool_create_slab_pool(cifs_min_rcv,
742 mempool_alloc_slab, 742 cifs_req_cachep);
743 mempool_free_slab,
744 cifs_req_cachep);
745 743
746 if(cifs_req_poolp == NULL) { 744 if(cifs_req_poolp == NULL) {
747 kmem_cache_destroy(cifs_req_cachep); 745 kmem_cache_destroy(cifs_req_cachep);
@@ -771,10 +769,8 @@ cifs_init_request_bufs(void)
771 cFYI(1,("cifs_min_small set to maximum (256)")); 769 cFYI(1,("cifs_min_small set to maximum (256)"));
772 } 770 }
773 771
774 cifs_sm_req_poolp = mempool_create(cifs_min_small, 772 cifs_sm_req_poolp = mempool_create_slab_pool(cifs_min_small,
775 mempool_alloc_slab, 773 cifs_sm_req_cachep);
776 mempool_free_slab,
777 cifs_sm_req_cachep);
778 774
779 if(cifs_sm_req_poolp == NULL) { 775 if(cifs_sm_req_poolp == NULL) {
780 mempool_destroy(cifs_req_poolp); 776 mempool_destroy(cifs_req_poolp);
@@ -808,10 +804,8 @@ cifs_init_mids(void)
808 if (cifs_mid_cachep == NULL) 804 if (cifs_mid_cachep == NULL)
809 return -ENOMEM; 805 return -ENOMEM;
810 806
811 cifs_mid_poolp = mempool_create(3 /* a reasonable min simultan opers */, 807 /* 3 is a reasonable minimum number of simultaneous operations */
812 mempool_alloc_slab, 808 cifs_mid_poolp = mempool_create_slab_pool(3, cifs_mid_cachep);
813 mempool_free_slab,
814 cifs_mid_cachep);
815 if(cifs_mid_poolp == NULL) { 809 if(cifs_mid_poolp == NULL) {
816 kmem_cache_destroy(cifs_mid_cachep); 810 kmem_cache_destroy(cifs_mid_cachep);
817 return -ENOMEM; 811 return -ENOMEM;