Lines Matching refs:new_rule
76 struct landlock_rule *new_rule; in create_rule() local
88 new_rule = kzalloc(struct_size(new_rule, layers, new_num_layers), in create_rule()
90 if (!new_rule) in create_rule()
92 RB_CLEAR_NODE(&new_rule->node); in create_rule()
94 new_rule->object = object; in create_rule()
95 new_rule->num_layers = new_num_layers; in create_rule()
97 memcpy(new_rule->layers, layers, in create_rule()
98 flex_array_size(new_rule, layers, num_layers)); in create_rule()
101 new_rule->layers[new_rule->num_layers - 1] = *new_layer; in create_rule()
102 return new_rule; in create_rule()
152 struct landlock_rule *new_rule; in insert_rule() local
197 new_rule = create_rule(object, &this->layers, this->num_layers, in insert_rule()
199 if (IS_ERR(new_rule)) in insert_rule()
200 return PTR_ERR(new_rule); in insert_rule()
201 rb_replace_node(&this->node, &new_rule->node, &ruleset->root); in insert_rule()
210 new_rule = create_rule(object, layers, num_layers, NULL); in insert_rule()
211 if (IS_ERR(new_rule)) in insert_rule()
212 return PTR_ERR(new_rule); in insert_rule()
213 rb_link_node(&new_rule->node, parent_node, walker_node); in insert_rule()
214 rb_insert_color(&new_rule->node, &ruleset->root); in insert_rule()