dlm: lost put_lkb on error path in receive_convert() and receive_unlock()
authorVasily Averin <vvs@virtuozzo.com>
Thu, 15 Nov 2018 10:18:24 +0000 (13:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 09:03:52 +0000 (10:03 +0100)
commit c0174726c3976e67da8649ac62cae43220ae173a upstream.

Fixes 6d40c4a708e0 ("dlm: improve error and debug messages")
Cc: stable@kernel.org # 3.5
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/dlm/lock.c

index 1d404c832e33091b4ab8376b81da3d2ef8389c4c..1e6a3a391849770c6cd8d8c654343a41e70f9b81 100644 (file)
@@ -4178,6 +4178,7 @@ static int receive_convert(struct dlm_ls *ls, struct dlm_message *ms)
                          (unsigned long long)lkb->lkb_recover_seq,
                          ms->m_header.h_nodeid, ms->m_lkid);
                error = -ENOENT;
+               dlm_put_lkb(lkb);
                goto fail;
        }
 
@@ -4231,6 +4232,7 @@ static int receive_unlock(struct dlm_ls *ls, struct dlm_message *ms)
                          lkb->lkb_id, lkb->lkb_remid,
                          ms->m_header.h_nodeid, ms->m_lkid);
                error = -ENOENT;
+               dlm_put_lkb(lkb);
                goto fail;
        }