jbd2: use kmem_cache_zalloc instead of kmem_cache_alloc/memset

The jbd2_alloc_handle() function is only called by new_handle().  So
this commit uses kmem_cache_zalloc() instead of
kmem_cache_alloc()/memset().

Signed-off-by: Zheng Liu <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
This commit is contained in:
Zheng Liu 2013-04-19 17:49:23 -04:00 • committed by Theodore Ts'o
commit 28daf4fae8
2 changed files with 1 additions and 2 deletions

View file

@ -332,7 +332,6 @@ static handle_t *new_handle(int nblocks)
handle_t *handle = jbd2_alloc_handle(GFP_NOFS);
if (!handle)
return NULL;
memset(handle, 0, sizeof(*handle));
handle->h_buffer_credits = nblocks;
handle->h_ref = 1;