diff options
Diffstat (limited to 'fs/dlm/rcom.c')
-rw-r--r-- | fs/dlm/rcom.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c index fb0776201d73..3f9b96fd26e8 100644 --- a/fs/dlm/rcom.c +++ b/fs/dlm/rcom.c | |||
@@ -129,7 +129,7 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid) | |||
129 | ls->ls_recover_nodeid = nodeid; | 129 | ls->ls_recover_nodeid = nodeid; |
130 | 130 | ||
131 | if (nodeid == dlm_our_nodeid()) { | 131 | if (nodeid == dlm_our_nodeid()) { |
132 | rc = (struct dlm_rcom *) ls->ls_recover_buf; | 132 | rc = ls->ls_recover_buf; |
133 | rc->rc_result = dlm_recover_status(ls); | 133 | rc->rc_result = dlm_recover_status(ls); |
134 | goto out; | 134 | goto out; |
135 | } | 135 | } |
@@ -148,7 +148,7 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid) | |||
148 | if (error) | 148 | if (error) |
149 | goto out; | 149 | goto out; |
150 | 150 | ||
151 | rc = (struct dlm_rcom *) ls->ls_recover_buf; | 151 | rc = ls->ls_recover_buf; |
152 | 152 | ||
153 | if (rc->rc_result == -ESRCH) { | 153 | if (rc->rc_result == -ESRCH) { |
154 | /* we pretend the remote lockspace exists with 0 status */ | 154 | /* we pretend the remote lockspace exists with 0 status */ |
@@ -202,14 +202,15 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len) | |||
202 | { | 202 | { |
203 | struct dlm_rcom *rc; | 203 | struct dlm_rcom *rc; |
204 | struct dlm_mhandle *mh; | 204 | struct dlm_mhandle *mh; |
205 | int error = 0, len = sizeof(struct dlm_rcom); | 205 | int error = 0; |
206 | int max_size = dlm_config.ci_buffer_size - sizeof(struct dlm_rcom); | ||
206 | 207 | ||
207 | ls->ls_recover_nodeid = nodeid; | 208 | ls->ls_recover_nodeid = nodeid; |
208 | 209 | ||
209 | if (nodeid == dlm_our_nodeid()) { | 210 | if (nodeid == dlm_our_nodeid()) { |
210 | dlm_copy_master_names(ls, last_name, last_len, | 211 | dlm_copy_master_names(ls, last_name, last_len, |
211 | ls->ls_recover_buf + len, | 212 | ls->ls_recover_buf->rc_buf, |
212 | dlm_config.ci_buffer_size - len, nodeid); | 213 | max_size, nodeid); |
213 | goto out; | 214 | goto out; |
214 | } | 215 | } |
215 | 216 | ||