Whamcloud - gitweb
LU-16360 osc: fix lu_ref usage 22/51522/2
authorAlexey Lyashkov <alexey.lyashkov@hpe.com>
Fri, 2 Dec 2022 08:40:05 +0000 (11:40 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 24 Aug 2023 04:33:44 +0000 (04:33 +0000)
LDLM_LOCK_PUT should used with find lock by handle,
but LDLM_LOCK_RELEASE with get ref, let's fix it.

HPe-bug-id: LUS-11365
Test-Parameters: trivial
Fixes: 9c2fb0b29cec (LU-9679 osc: convert oe_refc to kref)
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: Ib720b496b585c915ba20e0651a88c4afdde98e99
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51522
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_cache.c

index 746f028..fd38335 100644 (file)
@@ -353,7 +353,7 @@ static void osc_extent_free(struct kref *kref)
        if (ext->oe_dlmlock) {
                lu_ref_del(&ext->oe_dlmlock->l_reference,
                           "osc_extent", ext);
-               LDLM_LOCK_PUT(ext->oe_dlmlock);
+               LDLM_LOCK_RELEASE(ext->oe_dlmlock);
                ext->oe_dlmlock = NULL;
        }
 #if 0