Skip to content

Commit c6b6d6d

Browse files
Alexander Aringteigland
authored andcommitted
fs: dlm: revert check required context while close
This patch reverts commit 2c3fa6a ("dlm: check required context while close"). The function dlm_midcomms_close(), which will call later dlm_lowcomms_close(), is called when the cluster manager tells the node got fenced which means on midcomms/lowcomms layer to disconnect the node from the cluster communication. The node can rejoin the cluster later. This patch was ensuring no new message were able to be triggered when we are in the close() function context. This was done by checking if the lockspace has been stopped. However there is a missing check that we only need to check specific lockspaces where the fenced node is member of. This is currently complicated because there is no way to easily check if a node is part of a specific lockspace without stopping the recovery. For now we just revert this commit as it is just a check to finding possible leaks of stopping lockspaces before close() is called. Cc: stable@vger.kernel.org Fixes: 2c3fa6a ("dlm: check required context while close") Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent 57e2c2f commit c6b6d6d

3 files changed

Lines changed: 0 additions & 16 deletions

File tree

fs/dlm/lockspace.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -935,15 +935,3 @@ void dlm_stop_lockspaces(void)
935935
log_print("dlm user daemon left %d lockspaces", count);
936936
}
937937

938-
void dlm_stop_lockspaces_check(void)
939-
{
940-
struct dlm_ls *ls;
941-
942-
spin_lock(&lslist_lock);
943-
list_for_each_entry(ls, &lslist, ls_list) {
944-
if (WARN_ON(!rwsem_is_locked(&ls->ls_in_recovery) ||
945-
!dlm_locking_stopped(ls)))
946-
break;
947-
}
948-
spin_unlock(&lslist_lock);
949-
}

fs/dlm/lockspace.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ struct dlm_ls *dlm_find_lockspace_local(void *id);
2727
struct dlm_ls *dlm_find_lockspace_device(int minor);
2828
void dlm_put_lockspace(struct dlm_ls *ls);
2929
void dlm_stop_lockspaces(void);
30-
void dlm_stop_lockspaces_check(void);
3130
int dlm_new_user_lockspace(const char *name, const char *cluster,
3231
uint32_t flags, int lvblen,
3332
const struct dlm_lockspace_ops *ops,

fs/dlm/midcomms.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
#include <net/tcp.h>
137137

138138
#include "dlm_internal.h"
139-
#include "lockspace.h"
140139
#include "lowcomms.h"
141140
#include "config.h"
142141
#include "memory.h"
@@ -1491,8 +1490,6 @@ int dlm_midcomms_close(int nodeid)
14911490
if (nodeid == dlm_our_nodeid())
14921491
return 0;
14931492

1494-
dlm_stop_lockspaces_check();
1495-
14961493
idx = srcu_read_lock(&nodes_srcu);
14971494
/* Abort pending close/remove operation */
14981495
node = nodeid2node(nodeid, 0);

0 commit comments

Comments
 (0)