diff options
Diffstat (limited to 'fs/dlm/member.c')
-rw-r--r-- | fs/dlm/member.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index 439249b62a57..926cd0cb6bff 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c | |||
@@ -52,7 +52,7 @@ static int dlm_add_member(struct dlm_ls *ls, int nodeid) | |||
52 | struct dlm_member *memb; | 52 | struct dlm_member *memb; |
53 | int w; | 53 | int w; |
54 | 54 | ||
55 | memb = kmalloc(sizeof(struct dlm_member), GFP_KERNEL); | 55 | memb = kzalloc(sizeof(struct dlm_member), GFP_KERNEL); |
56 | if (!memb) | 56 | if (!memb) |
57 | return -ENOMEM; | 57 | return -ENOMEM; |
58 | 58 | ||
@@ -79,9 +79,9 @@ static int dlm_is_member(struct dlm_ls *ls, int nodeid) | |||
79 | 79 | ||
80 | list_for_each_entry(memb, &ls->ls_nodes, list) { | 80 | list_for_each_entry(memb, &ls->ls_nodes, list) { |
81 | if (memb->nodeid == nodeid) | 81 | if (memb->nodeid == nodeid) |
82 | return TRUE; | 82 | return 1; |
83 | } | 83 | } |
84 | return FALSE; | 84 | return 0; |
85 | } | 85 | } |
86 | 86 | ||
87 | int dlm_is_removed(struct dlm_ls *ls, int nodeid) | 87 | int dlm_is_removed(struct dlm_ls *ls, int nodeid) |
@@ -90,9 +90,9 @@ int dlm_is_removed(struct dlm_ls *ls, int nodeid) | |||
90 | 90 | ||
91 | list_for_each_entry(memb, &ls->ls_nodes_gone, list) { | 91 | list_for_each_entry(memb, &ls->ls_nodes_gone, list) { |
92 | if (memb->nodeid == nodeid) | 92 | if (memb->nodeid == nodeid) |
93 | return TRUE; | 93 | return 1; |
94 | } | 94 | } |
95 | return FALSE; | 95 | return 0; |
96 | } | 96 | } |
97 | 97 | ||
98 | static void clear_memb_list(struct list_head *head) | 98 | static void clear_memb_list(struct list_head *head) |
@@ -178,10 +178,10 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out) | |||
178 | /* move departed members from ls_nodes to ls_nodes_gone */ | 178 | /* move departed members from ls_nodes to ls_nodes_gone */ |
179 | 179 | ||
180 | list_for_each_entry_safe(memb, safe, &ls->ls_nodes, list) { | 180 | list_for_each_entry_safe(memb, safe, &ls->ls_nodes, list) { |
181 | found = FALSE; | 181 | found = 0; |
182 | for (i = 0; i < rv->node_count; i++) { | 182 | for (i = 0; i < rv->node_count; i++) { |
183 | if (memb->nodeid == rv->nodeids[i]) { | 183 | if (memb->nodeid == rv->nodeids[i]) { |
184 | found = TRUE; | 184 | found = 1; |
185 | break; | 185 | break; |
186 | } | 186 | } |
187 | } | 187 | } |
@@ -271,10 +271,9 @@ int dlm_ls_start(struct dlm_ls *ls) | |||
271 | int *ids = NULL; | 271 | int *ids = NULL; |
272 | int error, count; | 272 | int error, count; |
273 | 273 | ||
274 | rv = kmalloc(sizeof(struct dlm_recover), GFP_KERNEL); | 274 | rv = kzalloc(sizeof(struct dlm_recover), GFP_KERNEL); |
275 | if (!rv) | 275 | if (!rv) |
276 | return -ENOMEM; | 276 | return -ENOMEM; |
277 | memset(rv, 0, sizeof(struct dlm_recover)); | ||
278 | 277 | ||
279 | error = count = dlm_nodeid_list(ls->ls_name, &ids); | 278 | error = count = dlm_nodeid_list(ls->ls_name, &ids); |
280 | if (error <= 0) | 279 | if (error <= 0) |