mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
dlm: return -ENOMEM if ls_recover_buf fails
This patch fixes to return -ENOMEM in case of an allocation failure that was forgotten to change in commit6c648035cb
("dlm: switch to use rhashtable for rsbs"). Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202404200536.jGi6052v-lkp@intel.com/ Fixes:6c648035cb
("dlm: switch to use rhashtable for rsbs") Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
7b012732d0
commit
7b72ab2c6a
1 changed files with 3 additions and 1 deletions
|
@ -482,8 +482,10 @@ static int new_lockspace(const char *name, const char *cluster,
|
|||
* might send less.
|
||||
*/
|
||||
ls->ls_recover_buf = kmalloc(DLM_MAX_SOCKET_BUFSIZE, GFP_NOFS);
|
||||
if (!ls->ls_recover_buf)
|
||||
if (!ls->ls_recover_buf) {
|
||||
error = -ENOMEM;
|
||||
goto out_lkbidr;
|
||||
}
|
||||
|
||||
ls->ls_slot = 0;
|
||||
ls->ls_num_slots = 0;
|
||||
|
|
Loading…
Reference in a new issue