From: Kurt Hackel Date: Wed, 17 Jan 2007 22:54:39 +0000 (-0800) Subject: ocfs2_dlm: Drop inflight refmap even if no locks found on the lockres X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50635f15b324cbf45a58f103e6b4c7e42502b683;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ocfs2_dlm: Drop inflight refmap even if no locks found on the lockres Signed-off-by: Kurt Hackel Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index f93315c98871..2e32fe65c6c2 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -1908,11 +1908,9 @@ skip_lvb: leave: /* balance the ref taken when the work was queued */ - if (added > 0) { - spin_lock(&res->spinlock); - dlm_lockres_drop_inflight_ref(dlm, res); - spin_unlock(&res->spinlock); - } + spin_lock(&res->spinlock); + dlm_lockres_drop_inflight_ref(dlm, res); + spin_unlock(&res->spinlock); if (ret < 0) { mlog_errno(ret);