aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster
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/cluster
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/cluster')
-rw-r--r--fs/ocfs2/cluster/heartbeat.c4
-rw-r--r--fs/ocfs2/cluster/nodemanager.c6
-rw-r--r--fs/ocfs2/cluster/tcp.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 4cd9a9580456..a25ef5a50386 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1553,7 +1553,7 @@ static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *g
1553 struct o2hb_region *reg = NULL; 1553 struct o2hb_region *reg = NULL;
1554 struct config_item *ret = NULL; 1554 struct config_item *ret = NULL;
1555 1555
1556 reg = kcalloc(1, sizeof(struct o2hb_region), GFP_KERNEL); 1556 reg = kzalloc(sizeof(struct o2hb_region), GFP_KERNEL);
1557 if (reg == NULL) 1557 if (reg == NULL)
1558 goto out; /* ENOMEM */ 1558 goto out; /* ENOMEM */
1559 1559
@@ -1679,7 +1679,7 @@ struct config_group *o2hb_alloc_hb_set(void)
1679 struct o2hb_heartbeat_group *hs = NULL; 1679 struct o2hb_heartbeat_group *hs = NULL;
1680 struct config_group *ret = NULL; 1680 struct config_group *ret = NULL;
1681 1681
1682 hs = kcalloc(1, sizeof(struct o2hb_heartbeat_group), GFP_KERNEL); 1682 hs = kzalloc(sizeof(struct o2hb_heartbeat_group), GFP_KERNEL);
1683 if (hs == NULL) 1683 if (hs == NULL)
1684 goto out; 1684 goto out;
1685 1685
diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
index 357f1d551771..b17333a0606b 100644
--- a/fs/ocfs2/cluster/nodemanager.c
+++ b/fs/ocfs2/cluster/nodemanager.c
@@ -714,7 +714,7 @@ static struct config_item *o2nm_node_group_make_item(struct config_group *group,
714 if (strlen(name) > O2NM_MAX_NAME_LEN) 714 if (strlen(name) > O2NM_MAX_NAME_LEN)
715 goto out; /* ENAMETOOLONG */ 715 goto out; /* ENAMETOOLONG */
716 716
717 node = kcalloc(1, sizeof(struct o2nm_node), GFP_KERNEL); 717 node = kzalloc(sizeof(struct o2nm_node), GFP_KERNEL);
718 if (node == NULL) 718 if (node == NULL)
719 goto out; /* ENOMEM */ 719 goto out; /* ENOMEM */
720 720
@@ -825,8 +825,8 @@ static struct config_group *o2nm_cluster_group_make_group(struct config_group *g
825 if (o2nm_single_cluster) 825 if (o2nm_single_cluster)
826 goto out; /* ENOSPC */ 826 goto out; /* ENOSPC */
827 827
828 cluster = kcalloc(1, sizeof(struct o2nm_cluster), GFP_KERNEL); 828 cluster = kzalloc(sizeof(struct o2nm_cluster), GFP_KERNEL);
829 ns = kcalloc(1, sizeof(struct o2nm_node_group), GFP_KERNEL); 829 ns = kzalloc(sizeof(struct o2nm_node_group), GFP_KERNEL);
830 defs = kcalloc(3, sizeof(struct config_group *), GFP_KERNEL); 830 defs = kcalloc(3, sizeof(struct config_group *), GFP_KERNEL);
831 o2hb_group = o2hb_alloc_hb_set(); 831 o2hb_group = o2hb_alloc_hb_set();
832 if (cluster == NULL || ns == NULL || o2hb_group == NULL || defs == NULL) 832 if (cluster == NULL || ns == NULL || o2hb_group == NULL || defs == NULL)
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 457753df1ae7..ae4ff4a6636b 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -324,7 +324,7 @@ static struct o2net_sock_container *sc_alloc(struct o2nm_node *node)
324 struct page *page = NULL; 324 struct page *page = NULL;
325 325
326 page = alloc_page(GFP_NOFS); 326 page = alloc_page(GFP_NOFS);
327 sc = kcalloc(1, sizeof(*sc), GFP_NOFS); 327 sc = kzalloc(sizeof(*sc), GFP_NOFS);
328 if (sc == NULL || page == NULL) 328 if (sc == NULL || page == NULL)
329 goto out; 329 goto out;
330 330
@@ -714,7 +714,7 @@ int o2net_register_handler(u32 msg_type, u32 key, u32 max_len,
714 goto out; 714 goto out;
715 } 715 }
716 716
717 nmh = kcalloc(1, sizeof(struct o2net_msg_handler), GFP_NOFS); 717 nmh = kzalloc(sizeof(struct o2net_msg_handler), GFP_NOFS);
718 if (nmh == NULL) { 718 if (nmh == NULL) {
719 ret = -ENOMEM; 719 ret = -ENOMEM;
720 goto out; 720 goto out;
@@ -1918,9 +1918,9 @@ int o2net_init(void)
1918 1918
1919 o2quo_init(); 1919 o2quo_init();
1920 1920
1921 o2net_hand = kcalloc(1, sizeof(struct o2net_handshake), GFP_KERNEL); 1921 o2net_hand = kzalloc(sizeof(struct o2net_handshake), GFP_KERNEL);
1922 o2net_keep_req = kcalloc(1, sizeof(struct o2net_msg), GFP_KERNEL); 1922 o2net_keep_req = kzalloc(sizeof(struct o2net_msg), GFP_KERNEL);
1923 o2net_keep_resp = kcalloc(1, sizeof(struct o2net_msg), GFP_KERNEL); 1923 o2net_keep_resp = kzalloc(sizeof(struct o2net_msg), GFP_KERNEL);
1924 if (!o2net_hand || !o2net_keep_req || !o2net_keep_resp) { 1924 if (!o2net_hand || !o2net_keep_req || !o2net_keep_resp) {
1925 kfree(o2net_hand); 1925 kfree(o2net_hand);
1926 kfree(o2net_keep_req); 1926 kfree(o2net_keep_req);