diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 9daa0b9feb8d..ebcf226a9e4a 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -339,8 +339,7 @@ alloc_client(struct xdr_netobj name) | |||
339 | { | 339 | { |
340 | struct nfs4_client *clp; | 340 | struct nfs4_client *clp; |
341 | 341 | ||
342 | if ((clp = kmalloc(sizeof(struct nfs4_client), GFP_KERNEL))!= NULL) { | 342 | if ((clp = kzalloc(sizeof(struct nfs4_client), GFP_KERNEL))!= NULL) { |
343 | memset(clp, 0, sizeof(*clp)); | ||
344 | if ((clp->cl_name.data = kmalloc(name.len, GFP_KERNEL)) != NULL) { | 343 | if ((clp->cl_name.data = kmalloc(name.len, GFP_KERNEL)) != NULL) { |
345 | memcpy(clp->cl_name.data, name.data, name.len); | 344 | memcpy(clp->cl_name.data, name.data, name.len); |
346 | clp->cl_name.len = name.len; | 345 | clp->cl_name.len = name.len; |
@@ -1006,13 +1005,10 @@ alloc_init_file(struct inode *ino) | |||
1006 | static void | 1005 | static void |
1007 | nfsd4_free_slab(kmem_cache_t **slab) | 1006 | nfsd4_free_slab(kmem_cache_t **slab) |
1008 | { | 1007 | { |
1009 | int status; | ||
1010 | |||
1011 | if (*slab == NULL) | 1008 | if (*slab == NULL) |
1012 | return; | 1009 | return; |
1013 | status = kmem_cache_destroy(*slab); | 1010 | kmem_cache_destroy(*slab); |
1014 | *slab = NULL; | 1011 | *slab = NULL; |
1015 | WARN_ON(status); | ||
1016 | } | 1012 | } |
1017 | 1013 | ||
1018 | static void | 1014 | static void |