Whamcloud - gitweb
LU-8130 lu_object: use RCU to free lu_object_header
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_handler.c
index fdde77b..0f95bc2 100644 (file)
@@ -1580,10 +1580,12 @@ static void osd_object_free(const struct lu_env *env, struct lu_object *l)
        dt_object_fini(&obj->oo_dt);
        if (obj->oo_hl_head != NULL)
                ldiskfs_htree_lock_head_free(obj->oo_hl_head);
+       /* obj doesn't contain an lu_object_header, so we don't need call_rcu */
        OBD_FREE_PTR(obj);
        if (unlikely(h)) {
                lu_object_header_fini(h);
-               OBD_FREE_PTR(h);
+               OBD_FREE_PRE(h, sizeof(*h), "kfreed");
+               kfree_rcu(h, loh_rcu);
        }
 }