Skip to content

Commit ba58995

Browse files
Alexander Aringteigland
authored andcommitted
dlm: fix pending remove if msg allocation fails
This patch unsets ls_remove_len and ls_remove_name if a message allocation of a remove messages fails. In this case we never send a remove message out but set the per ls ls_remove_len ls_remove_name variable for a pending remove. Unset those variable should indicate possible waiters in wait_pending_remove() that no pending remove is going on at this moment. Cc: [email protected] Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent f6f7418 commit ba58995

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/dlm/lock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4100,13 +4100,14 @@ static void send_repeat_remove(struct dlm_ls *ls, char *ms_name, int len)
41004100
rv = _create_message(ls, sizeof(struct dlm_message) + len,
41014101
dir_nodeid, DLM_MSG_REMOVE, &ms, &mh);
41024102
if (rv)
4103-
return;
4103+
goto out;
41044104

41054105
memcpy(ms->m_extra, name, len);
41064106
ms->m_hash = cpu_to_le32(hash);
41074107

41084108
send_message(mh, ms);
41094109

4110+
out:
41104111
spin_lock(&ls->ls_remove_spin);
41114112
ls->ls_remove_len = 0;
41124113
memset(ls->ls_remove_name, 0, DLM_RESNAME_MAXLEN);

0 commit comments

Comments
 (0)