Lines Matching refs:parent
290 aa_put_profile(rcu_access_pointer(profile->parent)); in aa_free_profile()
450 struct aa_profile *aa_find_child(struct aa_profile *parent, const char *name) in aa_find_child() argument
456 profile = __find_child(&parent->base.profiles, name); in aa_find_child()
516 struct aa_profile *parent, *profile = NULL; in __create_missing_ancestors() local
525 parent = profile; in __create_missing_ancestors()
533 profile = aa_alloc_null(parent, name, gfp); in __create_missing_ancestors()
537 if (!parent) in __create_missing_ancestors()
646 struct aa_profile *aa_alloc_null(struct aa_profile *parent, const char *name, in aa_alloc_null() argument
664 if (parent) { in aa_alloc_null()
665 profile->path_flags = parent->path_flags; in aa_alloc_null()
667 profile->label.mediates = parent->label.mediates; in aa_alloc_null()
669 rcu_assign_pointer(profile->parent, aa_get_profile(parent)); in aa_alloc_null()
670 profile->ns = aa_get_ns(parent->ns); in aa_alloc_null()
694 struct aa_profile *aa_new_learning_profile(struct aa_profile *parent, bool hat, in aa_new_learning_profile() argument
701 AA_BUG(!parent); in aa_new_learning_profile()
704 name = kmalloc(strlen(parent->base.hname) + 8 + strlen(base), in aa_new_learning_profile()
707 sprintf(name, "%s//null-%s", parent->base.hname, base); in aa_new_learning_profile()
713 name = kmalloc(strlen(parent->base.hname) + 2 + 7 + 8, gfp); in aa_new_learning_profile()
716 sprintf(name, "%s//null-%x", parent->base.hname, in aa_new_learning_profile()
717 atomic_inc_return(&parent->ns->uniq_null)); in aa_new_learning_profile()
722 profile = aa_find_child(parent, bname); in aa_new_learning_profile()
726 profile = aa_alloc_null(parent, name, gfp); in aa_new_learning_profile()
734 p = __find_child(&parent->base.profiles, bname); in aa_new_learning_profile()
739 __add_profile(&parent->base.profiles, profile); in aa_new_learning_profile()
996 rcu_assign_pointer(child->parent, aa_get_profile(new)); in __replace_profile()
1002 if (!rcu_access_pointer(new->parent)) { in __replace_profile()
1003 struct aa_profile *parent = aa_deref_parent(old); in __replace_profile() local
1004 rcu_assign_pointer(new->parent, aa_get_profile(parent)); in __replace_profile()
1059 struct aa_profile *parent, *newest; in update_to_newest_parent() local
1061 parent = rcu_dereference_protected(new->parent, in update_to_newest_parent()
1063 newest = aa_get_newest_profile(parent); in update_to_newest_parent()
1066 if (newest != parent) { in update_to_newest_parent()
1067 aa_put_profile(parent); in update_to_newest_parent()
1068 rcu_assign_pointer(new->parent, newest); in update_to_newest_parent()
1221 rcu_assign_pointer(ent->new->parent, aa_get_profile(p)); in aa_replace_profiles()
1235 struct dentry *parent; in aa_replace_profiles() local
1236 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
1239 parent = prof_child_dir(p); in aa_replace_profiles()
1241 parent = ns_subprofs_dir(ent->new->ns); in aa_replace_profiles()
1242 error = __aafs_profile_mkdir(ent->new, parent); in aa_replace_profiles()
1284 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
1285 struct aa_profile *parent; in aa_replace_profiles() local
1287 parent = update_to_newest_parent(ent->new); in aa_replace_profiles()
1288 lh = &parent->base.profiles; in aa_replace_profiles()
1383 mutex_lock_nested(&ns->parent->lock, ns->parent->level); in aa_remove_profiles()
1386 mutex_unlock(&ns->parent->lock); in aa_remove_profiles()