OSDN Git Service

Merge branch 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[uclinux-h8/linux.git] / fs / cifs / cifsfs.c
index a7be591..32cdea6 100644 (file)
@@ -1239,9 +1239,11 @@ cifs_init_request_bufs(void)
        cifs_dbg(VFS, "CIFSMaxBufSize %d 0x%x\n",
                 CIFSMaxBufSize, CIFSMaxBufSize);
 */
-       cifs_req_cachep = kmem_cache_create("cifs_request",
+       cifs_req_cachep = kmem_cache_create_usercopy("cifs_request",
                                            CIFSMaxBufSize + max_hdr_size, 0,
-                                           SLAB_HWCACHE_ALIGN, NULL);
+                                           SLAB_HWCACHE_ALIGN, 0,
+                                           CIFSMaxBufSize + max_hdr_size,
+                                           NULL);
        if (cifs_req_cachep == NULL)
                return -ENOMEM;
 
@@ -1267,9 +1269,9 @@ cifs_init_request_bufs(void)
        more SMBs to use small buffer alloc and is still much more
        efficient to alloc 1 per page off the slab compared to 17K (5page)
        alloc of large cifs buffers even when page debugging is on */
-       cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
+       cifs_sm_req_cachep = kmem_cache_create_usercopy("cifs_small_rq",
                        MAX_CIFS_SMALL_BUFFER_SIZE, 0, SLAB_HWCACHE_ALIGN,
-                       NULL);
+                       0, MAX_CIFS_SMALL_BUFFER_SIZE, NULL);
        if (cifs_sm_req_cachep == NULL) {
                mempool_destroy(cifs_req_poolp);
                kmem_cache_destroy(cifs_req_cachep);