[PATCH] Fix numerous kcalloc() calls, convert to kzalloc()
All kcalloc() calls of the form "kcalloc(1,...)" are converted to the equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect ordering of the first two arguments are fixed. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
90aef12e6d
commit
cd86128088
@@ -757,7 +757,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node)
|
||||
}
|
||||
BUG_ON(num == dead_node);
|
||||
|
||||
ndata = kcalloc(1, sizeof(*ndata), GFP_NOFS);
|
||||
ndata = kzalloc(sizeof(*ndata), GFP_NOFS);
|
||||
if (!ndata) {
|
||||
dlm_destroy_recovery_area(dlm, dead_node);
|
||||
return -ENOMEM;
|
||||
@@ -842,7 +842,7 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data)
|
||||
}
|
||||
BUG_ON(lr->dead_node != dlm->reco.dead_node);
|
||||
|
||||
item = kcalloc(1, sizeof(*item), GFP_NOFS);
|
||||
item = kzalloc(sizeof(*item), GFP_NOFS);
|
||||
if (!item) {
|
||||
dlm_put(dlm);
|
||||
return -ENOMEM;
|
||||
@@ -1323,7 +1323,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data)
|
||||
|
||||
ret = -ENOMEM;
|
||||
buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS);
|
||||
item = kcalloc(1, sizeof(*item), GFP_NOFS);
|
||||
item = kzalloc(sizeof(*item), GFP_NOFS);
|
||||
if (!buf || !item)
|
||||
goto leave;
|
||||
|
||||
|
Reference in New Issue
Block a user