Lines Matching refs:parent
256 hierarchy = hierarchy->parent;
314 static int inherit_ruleset(struct landlock_ruleset *const parent,
321 if (!parent)
326 mutex_lock_nested(&parent->lock, SINGLE_DEPTH_NESTING);
328 /* Copies the @parent tree. */
330 &parent->root, node) {
338 if (WARN_ON_ONCE(child->num_layers <= parent->num_layers)) {
342 /* Copies the parent layer stack and leaves a space for the new layer. */
343 memcpy(child->fs_access_masks, parent->fs_access_masks,
344 flex_array_size(parent, fs_access_masks, parent->num_layers));
346 if (WARN_ON_ONCE(!parent->hierarchy)) {
350 get_hierarchy(parent->hierarchy);
351 child->hierarchy->parent = parent->hierarchy;
354 mutex_unlock(&parent->lock);
396 * @parent: Parent domain.
399 * Returns the intersection of @parent and @ruleset, or returns @parent if
400 * @ruleset is empty, or returns a duplicate of @ruleset if @parent is empty.
403 landlock_merge_ruleset(struct landlock_ruleset *const parent,
411 if (WARN_ON_ONCE(!ruleset || parent == ruleset))
414 if (parent) {
415 if (parent->num_layers >= LANDLOCK_MAX_NUM_LAYERS)
417 num_layers = parent->num_layers + 1;
434 /* ...as a child of @parent... */
435 err = inherit_ruleset(parent, new_dom);