Skip to content

Commit 2a0ec06

Browse files
Alexander Aringroxanan1996
authored andcommitted
fs: dlm: revert check required context while close
BugLink: https://bugs.launchpad.net/bugs/2036075 commit c6b6d6d upstream. 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: [email protected] Fixes: 2c3fa6a ("dlm: check required context while close") Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent e2ffaf0 commit 2a0ec06

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

fs/dlm/lockspace.c

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

958-
void dlm_stop_lockspaces_check(void)
959-
{
960-
struct dlm_ls *ls;
961-
962-
spin_lock(&lslist_lock);
963-
list_for_each_entry(ls, &lslist, ls_list) {
964-
if (WARN_ON(!rwsem_is_locked(&ls->ls_in_recovery) ||
965-
!dlm_locking_stopped(ls)))
966-
break;
967-
}
968-
spin_unlock(&lslist_lock);
969-
}

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"
@@ -1483,8 +1482,6 @@ int dlm_midcomms_close(int nodeid)
14831482
if (nodeid == dlm_our_nodeid())
14841483
return 0;
14851484

1486-
dlm_stop_lockspaces_check();
1487-
14881485
idx = srcu_read_lock(&nodes_srcu);
14891486
/* Abort pending close/remove operation */
14901487
node = nodeid2node(nodeid, 0);

0 commit comments

Comments
 (0)