dlm: handle invalid lockspace member remove
Since commit de7b4869b4
("dlm: add new configfs entry release_recover
for lockspace members") we are moving lockspace members into a gone list
before removing them to get additional removing attributes from
configfs. There is still a very unlikely possibility when
find_config_node() returns NULL, then for some reason the node wasn't
marked as gone but it was removed. We will just handle this case and drop
an error to observe if this case can ever happen.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/gfs2/aJ2Ssuh8xlsTutrA@stanley.mountain/T/#u
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
6f4f4ca5ca
commit
452d90def2
|
@ -571,7 +571,13 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out)
|
|||
|
||||
list_for_each_entry_safe(memb, safe, &ls->ls_nodes, list) {
|
||||
node = find_config_node(rv, memb->nodeid);
|
||||
if (node && !node->new && !node->gone)
|
||||
if (!node) {
|
||||
log_error(ls, "remove member %d invalid",
|
||||
memb->nodeid);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (!node->new && !node->gone)
|
||||
continue;
|
||||
|
||||
release_recover = 0;
|
||||
|
|
Loading…
Reference in New Issue