diff options
Diffstat (limited to 'fs/dlm/member.c')
-rw-r--r-- | fs/dlm/member.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index 26133f05ae3a..b128775913b2 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | ******************************************************************************* | 2 | ******************************************************************************* |
3 | ** | 3 | ** |
4 | ** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved. | 4 | ** Copyright (C) 2005-2009 Red Hat, Inc. All rights reserved. |
5 | ** | 5 | ** |
6 | ** This copyrighted material is made available to anyone wishing to use, | 6 | ** This copyrighted material is made available to anyone wishing to use, |
7 | ** modify, copy, or redistribute it subject to the terms and conditions | 7 | ** modify, copy, or redistribute it subject to the terms and conditions |
@@ -17,6 +17,7 @@ | |||
17 | #include "recover.h" | 17 | #include "recover.h" |
18 | #include "rcom.h" | 18 | #include "rcom.h" |
19 | #include "config.h" | 19 | #include "config.h" |
20 | #include "lowcomms.h" | ||
20 | 21 | ||
21 | static void add_ordered_member(struct dlm_ls *ls, struct dlm_member *new) | 22 | static void add_ordered_member(struct dlm_ls *ls, struct dlm_member *new) |
22 | { | 23 | { |
@@ -45,9 +46,9 @@ static void add_ordered_member(struct dlm_ls *ls, struct dlm_member *new) | |||
45 | static int dlm_add_member(struct dlm_ls *ls, int nodeid) | 46 | static int dlm_add_member(struct dlm_ls *ls, int nodeid) |
46 | { | 47 | { |
47 | struct dlm_member *memb; | 48 | struct dlm_member *memb; |
48 | int w; | 49 | int w, error; |
49 | 50 | ||
50 | memb = kzalloc(sizeof(struct dlm_member), GFP_KERNEL); | 51 | memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); |
51 | if (!memb) | 52 | if (!memb) |
52 | return -ENOMEM; | 53 | return -ENOMEM; |
53 | 54 | ||
@@ -57,6 +58,12 @@ static int dlm_add_member(struct dlm_ls *ls, int nodeid) | |||
57 | return w; | 58 | return w; |
58 | } | 59 | } |
59 | 60 | ||
61 | error = dlm_lowcomms_connect_node(nodeid); | ||
62 | if (error < 0) { | ||
63 | kfree(memb); | ||
64 | return error; | ||
65 | } | ||
66 | |||
60 | memb->nodeid = nodeid; | 67 | memb->nodeid = nodeid; |
61 | memb->weight = w; | 68 | memb->weight = w; |
62 | add_ordered_member(ls, memb); | 69 | add_ordered_member(ls, memb); |
@@ -136,7 +143,7 @@ static void make_member_array(struct dlm_ls *ls) | |||
136 | 143 | ||
137 | ls->ls_total_weight = total; | 144 | ls->ls_total_weight = total; |
138 | 145 | ||
139 | array = kmalloc(sizeof(int) * total, GFP_KERNEL); | 146 | array = kmalloc(sizeof(int) * total, ls->ls_allocation); |
140 | if (!array) | 147 | if (!array) |
141 | return; | 148 | return; |
142 | 149 | ||
@@ -219,7 +226,7 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out) | |||
219 | continue; | 226 | continue; |
220 | log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]); | 227 | log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]); |
221 | 228 | ||
222 | memb = kzalloc(sizeof(struct dlm_member), GFP_KERNEL); | 229 | memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); |
223 | if (!memb) | 230 | if (!memb) |
224 | return -ENOMEM; | 231 | return -ENOMEM; |
225 | memb->nodeid = rv->new[i]; | 232 | memb->nodeid = rv->new[i]; |
@@ -334,7 +341,7 @@ int dlm_ls_start(struct dlm_ls *ls) | |||
334 | int *ids = NULL, *new = NULL; | 341 | int *ids = NULL, *new = NULL; |
335 | int error, ids_count = 0, new_count = 0; | 342 | int error, ids_count = 0, new_count = 0; |
336 | 343 | ||
337 | rv = kzalloc(sizeof(struct dlm_recover), GFP_KERNEL); | 344 | rv = kzalloc(sizeof(struct dlm_recover), ls->ls_allocation); |
338 | if (!rv) | 345 | if (!rv) |
339 | return -ENOMEM; | 346 | return -ENOMEM; |
340 | 347 | ||