aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/member.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-01-20 03:47:07 -0500
committerSteven Whitehouse <steve@chygwyn.com>2006-01-20 03:47:07 -0500
commit901359256b2666f52a3a7d3f31927677e91b3a2a (patch)
tree24d4ee2c1ad63a0e6c3a303ad67eac3342772c4f /fs/dlm/member.c
parentec5800246607183a1d7fd0bae5f087c12439e9e7 (diff)
[DLM] Update DLM to the latest patch level
Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/member.c')
-rw-r--r--fs/dlm/member.c17
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
87int dlm_is_removed(struct dlm_ls *ls, int nodeid) 87int 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
98static void clear_memb_list(struct list_head *head) 98static 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)