diff options
Diffstat (limited to 'fs/ocfs2/stackglue.c')
-rw-r--r-- | fs/ocfs2/stackglue.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index cb7ec0b63ddc..1324e6600e57 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c | |||
@@ -309,6 +309,8 @@ int ocfs2_plock(struct ocfs2_cluster_connection *conn, u64 ino, | |||
309 | EXPORT_SYMBOL_GPL(ocfs2_plock); | 309 | EXPORT_SYMBOL_GPL(ocfs2_plock); |
310 | 310 | ||
311 | int ocfs2_cluster_connect(const char *stack_name, | 311 | int ocfs2_cluster_connect(const char *stack_name, |
312 | const char *cluster_name, | ||
313 | int cluster_name_len, | ||
312 | const char *group, | 314 | const char *group, |
313 | int grouplen, | 315 | int grouplen, |
314 | struct ocfs2_locking_protocol *lproto, | 316 | struct ocfs2_locking_protocol *lproto, |
@@ -342,8 +344,10 @@ int ocfs2_cluster_connect(const char *stack_name, | |||
342 | goto out; | 344 | goto out; |
343 | } | 345 | } |
344 | 346 | ||
345 | memcpy(new_conn->cc_name, group, grouplen); | 347 | strlcpy(new_conn->cc_name, group, GROUP_NAME_MAX + 1); |
346 | new_conn->cc_namelen = grouplen; | 348 | new_conn->cc_namelen = grouplen; |
349 | strlcpy(new_conn->cc_cluster_name, cluster_name, CLUSTER_NAME_MAX + 1); | ||
350 | new_conn->cc_cluster_name_len = cluster_name_len; | ||
347 | new_conn->cc_recovery_handler = recovery_handler; | 351 | new_conn->cc_recovery_handler = recovery_handler; |
348 | new_conn->cc_recovery_data = recovery_data; | 352 | new_conn->cc_recovery_data = recovery_data; |
349 | 353 | ||
@@ -386,8 +390,9 @@ int ocfs2_cluster_connect_agnostic(const char *group, | |||
386 | 390 | ||
387 | if (cluster_stack_name[0]) | 391 | if (cluster_stack_name[0]) |
388 | stack_name = cluster_stack_name; | 392 | stack_name = cluster_stack_name; |
389 | return ocfs2_cluster_connect(stack_name, group, grouplen, lproto, | 393 | return ocfs2_cluster_connect(stack_name, NULL, 0, group, grouplen, |
390 | recovery_handler, recovery_data, conn); | 394 | lproto, recovery_handler, recovery_data, |
395 | conn); | ||
391 | } | 396 | } |
392 | EXPORT_SYMBOL_GPL(ocfs2_cluster_connect_agnostic); | 397 | EXPORT_SYMBOL_GPL(ocfs2_cluster_connect_agnostic); |
393 | 398 | ||
@@ -460,9 +465,10 @@ void ocfs2_cluster_hangup(const char *group, int grouplen) | |||
460 | } | 465 | } |
461 | EXPORT_SYMBOL_GPL(ocfs2_cluster_hangup); | 466 | EXPORT_SYMBOL_GPL(ocfs2_cluster_hangup); |
462 | 467 | ||
463 | int ocfs2_cluster_this_node(unsigned int *node) | 468 | int ocfs2_cluster_this_node(struct ocfs2_cluster_connection *conn, |
469 | unsigned int *node) | ||
464 | { | 470 | { |
465 | return active_stack->sp_ops->this_node(node); | 471 | return active_stack->sp_ops->this_node(conn, node); |
466 | } | 472 | } |
467 | EXPORT_SYMBOL_GPL(ocfs2_cluster_this_node); | 473 | EXPORT_SYMBOL_GPL(ocfs2_cluster_this_node); |
468 | 474 | ||