Lines Matching refs:hierarchy
245 static inline void get_hierarchy(struct landlock_hierarchy *const hierarchy) in get_hierarchy() argument
247 if (hierarchy) in get_hierarchy()
248 refcount_inc(&hierarchy->usage); in get_hierarchy()
251 static void put_hierarchy(struct landlock_hierarchy *hierarchy) in put_hierarchy() argument
253 while (hierarchy && refcount_dec_and_test(&hierarchy->usage)) { in put_hierarchy()
254 const struct landlock_hierarchy *const freeme = hierarchy; in put_hierarchy()
256 hierarchy = hierarchy->parent; in put_hierarchy()
272 if (WARN_ON_ONCE(!dst || !dst->hierarchy)) in merge_ruleset()
346 if (WARN_ON_ONCE(!parent->hierarchy)) { in inherit_ruleset()
350 get_hierarchy(parent->hierarchy); in inherit_ruleset()
351 child->hierarchy->parent = parent->hierarchy; in inherit_ruleset()
366 put_hierarchy(ruleset->hierarchy); in free_ruleset()
426 new_dom->hierarchy = in landlock_merge_ruleset()
427 kzalloc(sizeof(*new_dom->hierarchy), GFP_KERNEL_ACCOUNT); in landlock_merge_ruleset()
428 if (!new_dom->hierarchy) { in landlock_merge_ruleset()
432 refcount_set(&new_dom->hierarchy->usage, 1); in landlock_merge_ruleset()