Skip to content

Commit 2c39450

Browse files
Joel BeckerMark Fasheh
authored andcommitted
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>
1 parent 9f9a99f commit 2c39450

4 files changed

Lines changed: 6 additions & 23 deletions

File tree

‎fs/ocfs2/stack_o2cb.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ static int o2cb_cluster_connect(struct ocfs2_cluster_connection *conn)
317317
return rc;
318318
}
319319

320-
static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn,
321-
int hangup_pending)
320+
static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn)
322321
{
323322
struct dlm_ctxt *dlm = conn->cc_lockspace;
324323
struct o2dlm_private *priv = conn->cc_private;

‎fs/ocfs2/stack_user.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,7 @@ static int user_cluster_connect(struct ocfs2_cluster_connection *conn)
816816
return rc;
817817
}
818818

819-
static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn,
820-
int hangup_pending)
819+
static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn)
821820
{
822821
dlm_release_lockspace(conn->cc_lockspace, 2);
823822
conn->cc_lockspace = NULL;

‎fs/ocfs2/stackglue.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
352352

353353
BUG_ON(conn == NULL);
354354

355-
ret = active_stack->sp_ops->disconnect(conn, hangup_pending);
355+
ret = active_stack->sp_ops->disconnect(conn);
356356

357357
/* XXX Should we free it anyway? */
358358
if (!ret) {
@@ -406,9 +406,6 @@ void ocfs2_cluster_hangup(const char *group, int grouplen)
406406
BUG_ON(group == NULL);
407407
BUG_ON(group[grouplen] != '\0');
408408

409-
if (active_stack->sp_ops->hangup)
410-
active_stack->sp_ops->hangup(group, grouplen);
411-
412409
ocfs2_leave_group(group);
413410

414411
/* cluster_disconnect() was called with hangup_pending==1 */

‎fs/ocfs2/stackglue.h‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,10 @@ struct ocfs2_stack_operations {
134134
* be freed. Thus, a stack must not return from ->disconnect()
135135
* until it will no longer reference the conn pointer.
136136
*
137-
* If hangup_pending is zero, ocfs2_cluster_disconnect() will also
138-
* be dropping the reference on the module.
137+
* Once this call returns, the stack glue will be dropping this
138+
* connection's reference on the module.
139139
*/
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);
140+
int (*disconnect)(struct ocfs2_cluster_connection *conn);
153141

154142
/*
155143
* ->this_node() returns the cluster's unique identifier for the

0 commit comments

Comments
 (0)