Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-drm-fsl-dcu.git] / fs / smbfs / request.c
index 0fb74697abc401694ea0a0e9aed4f8352a5213c5..42261dbdf60f172270dff8c70c1942c50a2ce0b3 100644 (file)
@@ -25,7 +25,7 @@
 #define ROUND_UP(x) (((x)+3) & ~3)
 
 /* cache for request structures */
-static kmem_cache_t *req_cachep;
+static struct kmem_cache *req_cachep;
 
 static int smb_request_send_req(struct smb_request *req);
 
@@ -61,7 +61,7 @@ static struct smb_request *smb_do_alloc_request(struct smb_sb_info *server,
        struct smb_request *req;
        unsigned char *buf = NULL;
 
-       req = kmem_cache_alloc(req_cachep, SLAB_KERNEL);
+       req = kmem_cache_zalloc(req_cachep, GFP_KERNEL);
        VERBOSE("allocating request: %p\n", req);
        if (!req)
                goto out;
@@ -74,7 +74,6 @@ static struct smb_request *smb_do_alloc_request(struct smb_sb_info *server,
                }
        }
 
-       memset(req, 0, sizeof(struct smb_request));
        req->rq_buffer = buf;
        req->rq_bufsize = bufsize;
        req->rq_server = server;