diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /fs/dlm/config.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r-- | fs/dlm/config.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c index fd9859f92fad..b54bca03d92f 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/configfs.h> | 16 | #include <linux/configfs.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/in.h> | 18 | #include <linux/in.h> |
18 | #include <linux/in6.h> | 19 | #include <linux/in6.h> |
19 | #include <net/ipv6.h> | 20 | #include <net/ipv6.h> |
@@ -410,10 +411,10 @@ static struct config_group *make_cluster(struct config_group *g, | |||
410 | struct dlm_comms *cms = NULL; | 411 | struct dlm_comms *cms = NULL; |
411 | void *gps = NULL; | 412 | void *gps = NULL; |
412 | 413 | ||
413 | cl = kzalloc(sizeof(struct dlm_cluster), GFP_KERNEL); | 414 | cl = kzalloc(sizeof(struct dlm_cluster), GFP_NOFS); |
414 | gps = kcalloc(3, sizeof(struct config_group *), GFP_KERNEL); | 415 | gps = kcalloc(3, sizeof(struct config_group *), GFP_NOFS); |
415 | sps = kzalloc(sizeof(struct dlm_spaces), GFP_KERNEL); | 416 | sps = kzalloc(sizeof(struct dlm_spaces), GFP_NOFS); |
416 | cms = kzalloc(sizeof(struct dlm_comms), GFP_KERNEL); | 417 | cms = kzalloc(sizeof(struct dlm_comms), GFP_NOFS); |
417 | 418 | ||
418 | if (!cl || !gps || !sps || !cms) | 419 | if (!cl || !gps || !sps || !cms) |
419 | goto fail; | 420 | goto fail; |
@@ -482,9 +483,9 @@ static struct config_group *make_space(struct config_group *g, const char *name) | |||
482 | struct dlm_nodes *nds = NULL; | 483 | struct dlm_nodes *nds = NULL; |
483 | void *gps = NULL; | 484 | void *gps = NULL; |
484 | 485 | ||
485 | sp = kzalloc(sizeof(struct dlm_space), GFP_KERNEL); | 486 | sp = kzalloc(sizeof(struct dlm_space), GFP_NOFS); |
486 | gps = kcalloc(2, sizeof(struct config_group *), GFP_KERNEL); | 487 | gps = kcalloc(2, sizeof(struct config_group *), GFP_NOFS); |
487 | nds = kzalloc(sizeof(struct dlm_nodes), GFP_KERNEL); | 488 | nds = kzalloc(sizeof(struct dlm_nodes), GFP_NOFS); |
488 | 489 | ||
489 | if (!sp || !gps || !nds) | 490 | if (!sp || !gps || !nds) |
490 | goto fail; | 491 | goto fail; |
@@ -536,7 +537,7 @@ static struct config_item *make_comm(struct config_group *g, const char *name) | |||
536 | { | 537 | { |
537 | struct dlm_comm *cm; | 538 | struct dlm_comm *cm; |
538 | 539 | ||
539 | cm = kzalloc(sizeof(struct dlm_comm), GFP_KERNEL); | 540 | cm = kzalloc(sizeof(struct dlm_comm), GFP_NOFS); |
540 | if (!cm) | 541 | if (!cm) |
541 | return ERR_PTR(-ENOMEM); | 542 | return ERR_PTR(-ENOMEM); |
542 | 543 | ||
@@ -569,7 +570,7 @@ static struct config_item *make_node(struct config_group *g, const char *name) | |||
569 | struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); | 570 | struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); |
570 | struct dlm_node *nd; | 571 | struct dlm_node *nd; |
571 | 572 | ||
572 | nd = kzalloc(sizeof(struct dlm_node), GFP_KERNEL); | 573 | nd = kzalloc(sizeof(struct dlm_node), GFP_NOFS); |
573 | if (!nd) | 574 | if (!nd) |
574 | return ERR_PTR(-ENOMEM); | 575 | return ERR_PTR(-ENOMEM); |
575 | 576 | ||
@@ -705,7 +706,7 @@ static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, size_t len) | |||
705 | if (cm->addr_count >= DLM_MAX_ADDR_COUNT) | 706 | if (cm->addr_count >= DLM_MAX_ADDR_COUNT) |
706 | return -ENOSPC; | 707 | return -ENOSPC; |
707 | 708 | ||
708 | addr = kzalloc(sizeof(*addr), GFP_KERNEL); | 709 | addr = kzalloc(sizeof(*addr), GFP_NOFS); |
709 | if (!addr) | 710 | if (!addr) |
710 | return -ENOMEM; | 711 | return -ENOMEM; |
711 | 712 | ||
@@ -868,7 +869,7 @@ int dlm_nodeid_list(char *lsname, int **ids_out, int *ids_count_out, | |||
868 | 869 | ||
869 | ids_count = sp->members_count; | 870 | ids_count = sp->members_count; |
870 | 871 | ||
871 | ids = kcalloc(ids_count, sizeof(int), GFP_KERNEL); | 872 | ids = kcalloc(ids_count, sizeof(int), GFP_NOFS); |
872 | if (!ids) { | 873 | if (!ids) { |
873 | rv = -ENOMEM; | 874 | rv = -ENOMEM; |
874 | goto out; | 875 | goto out; |
@@ -886,7 +887,7 @@ int dlm_nodeid_list(char *lsname, int **ids_out, int *ids_count_out, | |||
886 | if (!new_count) | 887 | if (!new_count) |
887 | goto out_ids; | 888 | goto out_ids; |
888 | 889 | ||
889 | new = kcalloc(new_count, sizeof(int), GFP_KERNEL); | 890 | new = kcalloc(new_count, sizeof(int), GFP_NOFS); |
890 | if (!new) { | 891 | if (!new) { |
891 | kfree(ids); | 892 | kfree(ids); |
892 | rv = -ENOMEM; | 893 | rv = -ENOMEM; |