aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-05-30 18:58:26 -0400
committerMark Fasheh <mfasheh@suse.com>2008-06-16 13:46:52 -0400
commit2c39450b39880e162b3eb339672314101f58ee1a (patch)
tree48e99a531dd5263d7a84cf23492373f45fbdea6e
parent9f9a99f4eccc64650e932090cff0ebd07b81e334 (diff)
ocfs2: Remove ->hangup() from stack glue operations.
The ->hangup() call was only used to execute ocfs2_hb_ctl. Now that the generic stack glue code handles this, the underlying stack drivers don't need to know about it. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
-rw-r--r--fs/ocfs2/stack_o2cb.c3
-rw-r--r--fs/ocfs2/stack_user.c3
-rw-r--r--fs/ocfs2/stackglue.c5
-rw-r--r--fs/ocfs2/stackglue.h18
4 files changed, 6 insertions, 23 deletions
diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
index 765ade5ee84a..fcd120f1493a 100644
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -317,8 +317,7 @@ out:
317 return rc; 317 return rc;
318} 318}
319 319
320static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn, 320static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn)
321 int hangup_pending)
322{ 321{
323 struct dlm_ctxt *dlm = conn->cc_lockspace; 322 struct dlm_ctxt *dlm = conn->cc_lockspace;
324 struct o2dlm_private *priv = conn->cc_private; 323 struct o2dlm_private *priv = conn->cc_private;
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index 6b97d11f6bf8..c021280dd462 100644
--- a/fs/ocfs2/stack_user.c
+++ b/fs/ocfs2/stack_user.c
@@ -816,8 +816,7 @@ out:
816 return rc; 816 return rc;
817} 817}
818 818
819static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn, 819static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn)
820 int hangup_pending)
821{ 820{
822 dlm_release_lockspace(conn->cc_lockspace, 2); 821 dlm_release_lockspace(conn->cc_lockspace, 2);
823 conn->cc_lockspace = NULL; 822 conn->cc_lockspace = NULL;
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
index 5f78ff4c76c7..10e149ae5e3a 100644
--- a/fs/ocfs2/stackglue.c
+++ b/fs/ocfs2/stackglue.c
@@ -352,7 +352,7 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
352 352
353 BUG_ON(conn == NULL); 353 BUG_ON(conn == NULL);
354 354
355 ret = active_stack->sp_ops->disconnect(conn, hangup_pending); 355 ret = active_stack->sp_ops->disconnect(conn);
356 356
357 /* XXX Should we free it anyway? */ 357 /* XXX Should we free it anyway? */
358 if (!ret) { 358 if (!ret) {
@@ -406,9 +406,6 @@ void ocfs2_cluster_hangup(const char *group, int grouplen)
406 BUG_ON(group == NULL); 406 BUG_ON(group == NULL);
407 BUG_ON(group[grouplen] != '\0'); 407 BUG_ON(group[grouplen] != '\0');
408 408
409 if (active_stack->sp_ops->hangup)
410 active_stack->sp_ops->hangup(group, grouplen);
411
412 ocfs2_leave_group(group); 409 ocfs2_leave_group(group);
413 410
414 /* cluster_disconnect() was called with hangup_pending==1 */ 411 /* cluster_disconnect() was called with hangup_pending==1 */
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h
index fe3fd2a12821..db56281dd1be 100644
--- a/fs/ocfs2/stackglue.h
+++ b/fs/ocfs2/stackglue.h
@@ -134,22 +134,10 @@ struct ocfs2_stack_operations {
134 * be freed. Thus, a stack must not return from ->disconnect() 134 * be freed. Thus, a stack must not return from ->disconnect()
135 * until it will no longer reference the conn pointer. 135 * until it will no longer reference the conn pointer.
136 * 136 *
137 * If hangup_pending is zero, ocfs2_cluster_disconnect() will also 137 * Once this call returns, the stack glue will be dropping this
138 * be dropping the reference on the module. 138 * connection's reference on the module.
139 */ 139 */
140 int (*disconnect)(struct ocfs2_cluster_connection *conn, 140 int (*disconnect)(struct ocfs2_cluster_connection *conn);
141 int hangup_pending);
142
143 /*
144 * ocfs2_cluster_hangup() exists for compatibility with older
145 * ocfs2 tools. Only the classic stack really needs it. As such
146 * ->hangup() is not required of all stacks. See the comment by
147 * ocfs2_cluster_hangup() for more details.
148 *
149 * Note that ocfs2_cluster_hangup() can only be called if
150 * hangup_pending was passed to ocfs2_cluster_disconnect().
151 */
152 void (*hangup)(const char *group, int grouplen);
153 141
154 /* 142 /*
155 * ->this_node() returns the cluster's unique identifier for the 143 * ->this_node() returns the cluster's unique identifier for the