From: Bruno Faccini Date: Thu, 7 Jan 2016 09:11:30 +0000 (+0100) Subject: LU-8221 osc: fix for lu_ref feature in osc_extent_put() X-Git-Tag: 2.13.53~88 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=dfa0036b5536ebc89177d70e994244877dca167e LU-8221 osc: fix for lu_ref feature in osc_extent_put() Trying to enable and use the USE_LU_REF/lu_ref feature, a previous clio related changes have been found to silently (as feature has not been tested since!) break it. In osc_extent_put(), there is no need to remove an implicit "handle" reference, by using LDLM_LOCK_PUT() macro, since it has never been acquired before. This was introduced by 3f3a24d LU-3259 clio: cl_lock simplification And the "osc_extent" reference must be deleted instead added. This patch makes the necessary changes to fix all of these. Signed-off-by: Bruno Faccini Change-Id: I86599ff97310b16c9599b6a52a88693872ae6d30 Reviewed-on: https://review.whamcloud.com/20519 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index b74736c..a9f2cc1 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -362,9 +362,9 @@ static void osc_extent_put(const struct lu_env *env, struct osc_extent *ext) LASSERT(!ext->oe_intree); if (ext->oe_dlmlock != NULL) { - lu_ref_add(&ext->oe_dlmlock->l_reference, + 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; } cl_object_put(env, osc2cl(ext->oe_obj));