summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/jbd/transaction.c1
-rw-r--r--include/linux/jbd.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 071d6905f0d..e3e255c0a50 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -245,7 +245,6 @@ static handle_t *new_handle(int nblocks)
handle_t *handle = jbd_alloc_handle(GFP_NOFS);
if (!handle)
return NULL;
- memset(handle, 0, sizeof(*handle));
handle->h_buffer_credits = nblocks;
handle->h_ref = 1;
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index c8f32975f0e..7e0b622503c 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -887,7 +887,7 @@ extern struct kmem_cache *jbd_handle_cache;
static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
{
- return kmem_cache_alloc(jbd_handle_cache, gfp_flags);
+ return kmem_cache_zalloc(jbd_handle_cache, gfp_flags);
}
static inline void jbd_free_handle(handle_t *handle)