JBD/ext3 cleanups: convert to kzalloc
Convert kmalloc to kzalloc() and get rid of the memset(). Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
345225c8e4
commit
8c3478a523
@@ -654,10 +654,9 @@ static journal_t * journal_init_common (void)
|
||||
journal_t *journal;
|
||||
int err;
|
||||
|
||||
journal = kmalloc(sizeof(*journal), GFP_KERNEL);
|
||||
journal = kzalloc(sizeof(*journal), GFP_KERNEL);
|
||||
if (!journal)
|
||||
goto fail;
|
||||
memset(journal, 0, sizeof(*journal));
|
||||
|
||||
init_waitqueue_head(&journal->j_wait_transaction_locked);
|
||||
init_waitqueue_head(&journal->j_wait_logspace);
|
||||
|
Reference in New Issue
Block a user