aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 2a13a2bac8f1..582d66ca6da5 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -733,7 +733,7 @@ cifs_init_request_bufs(void)
733 kmem_cache_destroy(cifs_req_cachep); 733 kmem_cache_destroy(cifs_req_cachep);
734 return -ENOMEM; 734 return -ENOMEM;
735 } 735 }
736 /* 256 (MAX_CIFS_HDR_SIZE bytes is enough for most SMB responses and 736 /* MAX_CIFS_SMALL_BUFFER_SIZE bytes is enough for most SMB responses and
737 almost all handle based requests (but not write response, nor is it 737 almost all handle based requests (but not write response, nor is it
738 sufficient for path based requests). A smaller size would have 738 sufficient for path based requests). A smaller size would have
739 been more efficient (compacting multiple slab items on one 4k page) 739 been more efficient (compacting multiple slab items on one 4k page)
@@ -742,7 +742,8 @@ cifs_init_request_bufs(void)
742 efficient to alloc 1 per page off the slab compared to 17K (5page) 742 efficient to alloc 1 per page off the slab compared to 17K (5page)
743 alloc of large cifs buffers even when page debugging is on */ 743 alloc of large cifs buffers even when page debugging is on */
744 cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq", 744 cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
745 MAX_CIFS_HDR_SIZE, 0, SLAB_HWCACHE_ALIGN, NULL, NULL); 745 MAX_CIFS_SMALL_BUFFER_SIZE, 0, SLAB_HWCACHE_ALIGN,
746 NULL, NULL);
746 if (cifs_sm_req_cachep == NULL) { 747 if (cifs_sm_req_cachep == NULL) {
747 mempool_destroy(cifs_req_poolp); 748 mempool_destroy(cifs_req_poolp);
748 kmem_cache_destroy(cifs_req_cachep); 749 kmem_cache_destroy(cifs_req_cachep);
@@ -954,6 +955,12 @@ init_cifs(void)
954 atomic_set(&tconInfoReconnectCount, 0); 955 atomic_set(&tconInfoReconnectCount, 0);
955 956
956 atomic_set(&bufAllocCount, 0); 957 atomic_set(&bufAllocCount, 0);
958 atomic_set(&smBufAllocCount, 0);
959#ifdef CONFIG_CIFS_STATS2
960 atomic_set(&totBufAllocCount, 0);
961 atomic_set(&totSmBufAllocCount, 0);
962#endif /* CONFIG_CIFS_STATS2 */
963
957 atomic_set(&midCount, 0); 964 atomic_set(&midCount, 0);
958 GlobalCurrentXid = 0; 965 GlobalCurrentXid = 0;
959 GlobalTotalActiveXid = 0; 966 GlobalTotalActiveXid = 0;