mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
dlm: fix pending remove if msg allocation fails
[ Upstream commit ba58995909
]
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: stable@vger.kernel.org
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
117633317a
commit
86b6c456dc
1 changed files with 2 additions and 1 deletions
|
@ -4065,13 +4065,14 @@ static void send_repeat_remove(struct dlm_ls *ls, char *ms_name, int len)
|
|||
rv = _create_message(ls, sizeof(struct dlm_message) + len,
|
||||
dir_nodeid, DLM_MSG_REMOVE, &ms, &mh);
|
||||
if (rv)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
memcpy(ms->m_extra, name, len);
|
||||
ms->m_hash = hash;
|
||||
|
||||
send_message(mh, ms);
|
||||
|
||||
out:
|
||||
spin_lock(&ls->ls_remove_spin);
|
||||
ls->ls_remove_len = 0;
|
||||
memset(ls->ls_remove_name, 0, DLM_RESNAME_MAXLEN);
|
||||
|
|
Loading…
Add table
Reference in a new issue