Lines Matching refs:parent
20 static void remove_files(struct kernfs_node *parent, in remove_files() argument
28 kernfs_remove_by_name(parent, (*attr)->name); in remove_files()
31 kernfs_remove_by_name(parent, (*bin_attr)->attr.name); in remove_files()
34 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files() argument
52 kernfs_remove_by_name(parent, (*attr)->name); in create_files()
64 error = sysfs_add_file_mode_ns(parent, *attr, mode, uid, in create_files()
70 remove_files(parent, grp); in create_files()
80 kernfs_remove_by_name(parent, in create_files()
93 error = sysfs_add_bin_file_mode_ns(parent, *bin_attr, in create_files()
100 remove_files(parent, grp); in create_files()
276 struct kernfs_node *parent = kobj->sd; in sysfs_remove_group() local
280 kn = kernfs_find_and_get(parent, grp->name); in sysfs_remove_group()
288 kn = parent; in sysfs_remove_group()
332 struct kernfs_node *parent; in sysfs_merge_group() local
339 parent = kernfs_find_and_get(kobj->sd, grp->name); in sysfs_merge_group()
340 if (!parent) in sysfs_merge_group()
346 error = sysfs_add_file_mode_ns(parent, *attr, (*attr)->mode, in sysfs_merge_group()
350 kernfs_remove_by_name(parent, (*--attr)->name); in sysfs_merge_group()
352 kernfs_put(parent); in sysfs_merge_group()
366 struct kernfs_node *parent; in sysfs_unmerge_group() local
369 parent = kernfs_find_and_get(kobj->sd, grp->name); in sysfs_unmerge_group()
370 if (parent) { in sysfs_unmerge_group()
372 kernfs_remove_by_name(parent, (*attr)->name); in sysfs_unmerge_group()
373 kernfs_put(parent); in sysfs_unmerge_group()
388 struct kernfs_node *parent; in sysfs_add_link_to_group() local
391 parent = kernfs_find_and_get(kobj->sd, group_name); in sysfs_add_link_to_group()
392 if (!parent) in sysfs_add_link_to_group()
395 error = sysfs_create_link_sd(parent, target, link_name); in sysfs_add_link_to_group()
396 kernfs_put(parent); in sysfs_add_link_to_group()
411 struct kernfs_node *parent; in sysfs_remove_link_from_group() local
413 parent = kernfs_find_and_get(kobj->sd, group_name); in sysfs_remove_link_from_group()
414 if (parent) { in sysfs_remove_link_from_group()
415 kernfs_remove_by_name(parent, link_name); in sysfs_remove_link_from_group()
416 kernfs_put(parent); in sysfs_remove_link_from_group()