aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2006-12-13 03:34:52 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:52 -0500
commitcd86128088554d64fea1679191509f00e6353c5b (patch)
treea828960f4bd44ef1682d88618e58c6ccd2367bc1 /fs/ocfs2/dlm
parent90aef12e6dd609e1ad7fb70044eedc78ca55ee5e (diff)
[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>
Diffstat (limited to 'fs/ocfs2/dlm')
-rw-r--r--fs/ocfs2/dlm/dlmdomain.c4
-rw-r--r--fs/ocfs2/dlm/dlmlock.c4
-rw-r--r--fs/ocfs2/dlm/dlmmaster.c2
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
index 420a375a3949..f0b25f2dd205 100644
--- a/fs/ocfs2/dlm/dlmdomain.c
+++ b/fs/ocfs2/dlm/dlmdomain.c
@@ -920,7 +920,7 @@ static int dlm_try_to_join_domain(struct dlm_ctxt *dlm)
920 920
921 mlog_entry("%p", dlm); 921 mlog_entry("%p", dlm);
922 922
923 ctxt = kcalloc(1, sizeof(*ctxt), GFP_KERNEL); 923 ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
924 if (!ctxt) { 924 if (!ctxt) {
925 status = -ENOMEM; 925 status = -ENOMEM;
926 mlog_errno(status); 926 mlog_errno(status);
@@ -1223,7 +1223,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain,
1223 int i; 1223 int i;
1224 struct dlm_ctxt *dlm = NULL; 1224 struct dlm_ctxt *dlm = NULL;
1225 1225
1226 dlm = kcalloc(1, sizeof(*dlm), GFP_KERNEL); 1226 dlm = kzalloc(sizeof(*dlm), GFP_KERNEL);
1227 if (!dlm) { 1227 if (!dlm) {
1228 mlog_errno(-ENOMEM); 1228 mlog_errno(-ENOMEM);
1229 goto leave; 1229 goto leave;
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c
index 42a1b91979b5..e5ca3db197f6 100644
--- a/fs/ocfs2/dlm/dlmlock.c
+++ b/fs/ocfs2/dlm/dlmlock.c
@@ -408,13 +408,13 @@ struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
408 struct dlm_lock *lock; 408 struct dlm_lock *lock;
409 int kernel_allocated = 0; 409 int kernel_allocated = 0;
410 410
411 lock = kcalloc(1, sizeof(*lock), GFP_NOFS); 411 lock = kzalloc(sizeof(*lock), GFP_NOFS);
412 if (!lock) 412 if (!lock)
413 return NULL; 413 return NULL;
414 414
415 if (!lksb) { 415 if (!lksb) {
416 /* zero memory only if kernel-allocated */ 416 /* zero memory only if kernel-allocated */
417 lksb = kcalloc(1, sizeof(*lksb), GFP_NOFS); 417 lksb = kzalloc(sizeof(*lksb), GFP_NOFS);
418 if (!lksb) { 418 if (!lksb) {
419 kfree(lock); 419 kfree(lock);
420 return NULL; 420 return NULL;
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 856012b4fa49..0ad872055cb3 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -1939,7 +1939,7 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
1939 int ignore_higher, u8 request_from, u32 flags) 1939 int ignore_higher, u8 request_from, u32 flags)
1940{ 1940{
1941 struct dlm_work_item *item; 1941 struct dlm_work_item *item;
1942 item = kcalloc(1, sizeof(*item), GFP_NOFS); 1942 item = kzalloc(sizeof(*item), GFP_NOFS);
1943 if (!item) 1943 if (!item)
1944 return -ENOMEM; 1944 return -ENOMEM;
1945 1945
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index fb3e2b0817f1..367a11e9e2ed 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -757,7 +757,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node)
757 } 757 }
758 BUG_ON(num == dead_node); 758 BUG_ON(num == dead_node);
759 759
760 ndata = kcalloc(1, sizeof(*ndata), GFP_NOFS); 760 ndata = kzalloc(sizeof(*ndata), GFP_NOFS);
761 if (!ndata) { 761 if (!ndata) {
762 dlm_destroy_recovery_area(dlm, dead_node); 762 dlm_destroy_recovery_area(dlm, dead_node);
763 return -ENOMEM; 763 return -ENOMEM;
@@ -842,7 +842,7 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data)
842 } 842 }
843 BUG_ON(lr->dead_node != dlm->reco.dead_node); 843 BUG_ON(lr->dead_node != dlm->reco.dead_node);
844 844
845 item = kcalloc(1, sizeof(*item), GFP_NOFS); 845 item = kzalloc(sizeof(*item), GFP_NOFS);
846 if (!item) { 846 if (!item) {
847 dlm_put(dlm); 847 dlm_put(dlm);
848 return -ENOMEM; 848 return -ENOMEM;
@@ -1323,7 +1323,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data)
1323 1323
1324 ret = -ENOMEM; 1324 ret = -ENOMEM;
1325 buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS); 1325 buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS);
1326 item = kcalloc(1, sizeof(*item), GFP_NOFS); 1326 item = kzalloc(sizeof(*item), GFP_NOFS);
1327 if (!buf || !item) 1327 if (!buf || !item)
1328 goto leave; 1328 goto leave;
1329 1329