Home
last modified time | relevance | path

Searched refs:kn (Results 1 – 25 of 61) sorted by relevance

123

/OK3568_Linux_fs/kernel/fs/kernfs/
H A Ddir.c35 static bool kernfs_active(struct kernfs_node *kn) in kernfs_active() argument
38 return atomic_read(&kn->active) >= 0; in kernfs_active()
41 static bool kernfs_lockdep(struct kernfs_node *kn) in kernfs_lockdep() argument
44 return kn->flags & KERNFS_LOCKDEP; in kernfs_lockdep()
50 static int kernfs_name_locked(struct kernfs_node *kn, char *buf, size_t buflen) in kernfs_name_locked() argument
52 if (!kn) in kernfs_name_locked()
55 return strlcpy(buf, kn->parent ? kn->name : "/", buflen); in kernfs_name_locked()
79 da = kernfs_depth(ra->kn, a); in kernfs_common_ancestor()
80 db = kernfs_depth(rb->kn, b); in kernfs_common_ancestor()
134 struct kernfs_node *kn, *common; in kernfs_path_from_node_locked() local
[all …]
H A Dinode.c33 static struct kernfs_iattrs *__kernfs_iattrs(struct kernfs_node *kn, int alloc) in __kernfs_iattrs() argument
40 if (kn->iattr || !alloc) in __kernfs_iattrs()
43 kn->iattr = kmem_cache_zalloc(kernfs_iattrs_cache, GFP_KERNEL); in __kernfs_iattrs()
44 if (!kn->iattr) in __kernfs_iattrs()
48 kn->iattr->ia_uid = GLOBAL_ROOT_UID; in __kernfs_iattrs()
49 kn->iattr->ia_gid = GLOBAL_ROOT_GID; in __kernfs_iattrs()
51 ktime_get_real_ts64(&kn->iattr->ia_atime); in __kernfs_iattrs()
52 kn->iattr->ia_mtime = kn->iattr->ia_atime; in __kernfs_iattrs()
53 kn->iattr->ia_ctime = kn->iattr->ia_atime; in __kernfs_iattrs()
55 simple_xattrs_init(&kn->iattr->xattrs); in __kernfs_iattrs()
[all …]
H A Dfile.c64 static const struct kernfs_ops *kernfs_ops(struct kernfs_node *kn) in kernfs_ops() argument
66 if (kn->flags & KERNFS_LOCKDEP) in kernfs_ops()
67 lockdep_assert_held(kn); in kernfs_ops()
68 return kn->attr.ops; in kernfs_ops()
96 const struct kernfs_ops *ops = kernfs_ops(of->kn); in kernfs_seq_stop_active()
100 kernfs_put_active(of->kn); in kernfs_seq_stop_active()
113 if (!kernfs_get_active(of->kn)) in kernfs_seq_start()
116 ops = kernfs_ops(of->kn); in kernfs_seq_start()
135 const struct kernfs_ops *ops = kernfs_ops(of->kn); in kernfs_seq_next()
166 of->event = atomic_read(&of->kn->attr.open->event); in kernfs_seq_show()
[all …]
H A Dsymlink.c29 struct kernfs_node *kn; in kernfs_create_link() local
39 kn = kernfs_new_node(parent, name, S_IFLNK|S_IRWXUGO, uid, gid, in kernfs_create_link()
41 if (!kn) in kernfs_create_link()
45 kn->ns = target->ns; in kernfs_create_link()
46 kn->symlink.target_kn = target; in kernfs_create_link()
49 error = kernfs_add_one(kn); in kernfs_create_link()
51 return kn; in kernfs_create_link()
53 kernfs_put(kn); in kernfs_create_link()
60 struct kernfs_node *base, *kn; in kernfs_get_target_path() local
67 kn = target->parent; in kernfs_get_target_path()
[all …]
H A Dmount.c59 struct kernfs_node *kn = inode->i_private; in kernfs_encode_fh() local
67 *(u64 *)fh = kn->id; in kernfs_encode_fh()
76 struct kernfs_node *kn; in __kernfs_fh_to_dentry() local
101 kn = kernfs_find_and_get_node_by_id(info->root, id); in __kernfs_fh_to_dentry()
102 if (!kn) in __kernfs_fh_to_dentry()
108 parent = kernfs_get_parent(kn); in __kernfs_fh_to_dentry()
109 kernfs_put(kn); in __kernfs_fh_to_dentry()
110 kn = parent; in __kernfs_fh_to_dentry()
111 if (!kn) in __kernfs_fh_to_dentry()
115 inode = kernfs_get_inode(sb, kn); in __kernfs_fh_to_dentry()
[all …]
H A Dkernfs-internal.h44 static inline struct kernfs_root *kernfs_root(struct kernfs_node *kn) in kernfs_root() argument
47 if (kn->parent) in kernfs_root()
48 kn = kn->parent; in kernfs_root()
49 return kn->dir.root; in kernfs_root()
97 int __kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr);
107 struct kernfs_node *kernfs_get_active(struct kernfs_node *kn);
108 void kernfs_put_active(struct kernfs_node *kn);
109 int kernfs_add_one(struct kernfs_node *kn);
120 void kernfs_drain_open_files(struct kernfs_node *kn);
/OK3568_Linux_fs/kernel/include/linux/
H A Dkernfs.h176 int (*rmdir)(struct kernfs_node *kn);
177 int (*rename)(struct kernfs_node *kn, struct kernfs_node *new_parent,
179 int (*show_path)(struct seq_file *sf, struct kernfs_node *kn,
190 struct kernfs_node *kn; member
209 struct kernfs_node *kn; member
302 static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn) in kernfs_type() argument
304 return kn->flags & KERNFS_TYPE_MASK; in kernfs_type()
325 static inline ino_t kernfs_ino(struct kernfs_node *kn) in kernfs_ino() argument
327 return kernfs_id_ino(kn->id); in kernfs_ino()
330 static inline ino_t kernfs_gen(struct kernfs_node *kn) in kernfs_gen() argument
[all …]
H A Dsysfs.h258 void sysfs_unbreak_active_protection(struct kernfs_node *kn);
316 static inline void sysfs_enable_ns(struct kernfs_node *kn) in sysfs_enable_ns() argument
318 return kernfs_enable_ns(kn); in sysfs_enable_ns()
398 static inline void sysfs_unbreak_active_protection(struct kernfs_node *kn) in sysfs_unbreak_active_protection() argument
545 static inline void sysfs_enable_ns(struct kernfs_node *kn) in sysfs_enable_ns() argument
614 static inline void sysfs_notify_dirent(struct kernfs_node *kn) in sysfs_notify_dirent() argument
616 kernfs_notify(kn); in sysfs_notify_dirent()
625 static inline struct kernfs_node *sysfs_get(struct kernfs_node *kn) in sysfs_get() argument
627 kernfs_get(kn); in sysfs_get()
628 return kn; in sysfs_get()
[all …]
H A Dcgroup.h317 return cgrp->kn->id; in cgroup_id()
632 return kernfs_ino(cgrp->kn); in cgroup_ino()
638 return of->kn->priv; in of_cft()
661 return kernfs_name(cgrp->kn, buf, buflen); in cgroup_name()
666 return kernfs_path(cgrp->kn, buf, buflen); in cgroup_path()
671 pr_cont_kernfs_name(cgrp->kn); in pr_cont_cgroup_name()
676 pr_cont_kernfs_path(cgrp->kn); in pr_cont_cgroup_path()
/OK3568_Linux_fs/kernel/fs/sysfs/
H A Dfile.c26 static const struct sysfs_ops *sysfs_file_ops(struct kernfs_node *kn) in sysfs_file_ops() argument
28 struct kobject *kobj = kn->parent->priv; in sysfs_file_ops()
30 if (kn->flags & KERNFS_LOCKDEP) in sysfs_file_ops()
31 lockdep_assert_held(kn); in sysfs_file_ops()
43 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show()
44 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_seq_show()
61 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
83 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_read()
84 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read()
107 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_read()
[all …]
H A Ddir.c42 struct kernfs_node *parent, *kn; in sysfs_create_dir_ns() local
59 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), in sysfs_create_dir_ns()
62 if (IS_ERR(kn)) { in sysfs_create_dir_ns()
63 if (PTR_ERR(kn) == -EEXIST) in sysfs_create_dir_ns()
65 return PTR_ERR(kn); in sysfs_create_dir_ns()
68 kobj->sd = kn; in sysfs_create_dir_ns()
82 struct kernfs_node *kn = kobj->sd; in sysfs_remove_dir() local
100 if (kn) { in sysfs_remove_dir()
101 WARN_ON_ONCE(kernfs_type(kn) != KERNFS_DIR); in sysfs_remove_dir()
102 kernfs_remove(kn); in sysfs_remove_dir()
[all …]
H A Dgroup.c111 struct kernfs_node *kn; in internal_create_group() local
130 kn = kernfs_find_and_get(kobj->sd, grp->name); in internal_create_group()
131 if (!kn) { in internal_create_group()
137 kn = kernfs_create_dir_ns(kobj->sd, grp->name, in internal_create_group()
140 if (IS_ERR(kn)) { in internal_create_group()
141 if (PTR_ERR(kn) == -EEXIST) in internal_create_group()
143 return PTR_ERR(kn); in internal_create_group()
147 kn = kobj->sd; in internal_create_group()
148 kernfs_get(kn); in internal_create_group()
149 error = create_files(kn, kobj, uid, gid, grp, update); in internal_create_group()
[all …]
H A Dsymlink.c24 struct kernfs_node *kn, *target = NULL; in sysfs_do_create_link_sd() local
44 kn = kernfs_create_link(parent, name, target); in sysfs_do_create_link_sd()
47 if (!IS_ERR(kn)) in sysfs_do_create_link_sd()
50 if (warn && PTR_ERR(kn) == -EEXIST) in sysfs_do_create_link_sd()
52 return PTR_ERR(kn); in sysfs_do_create_link_sd()
61 int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target, in sysfs_create_link_sd() argument
64 return sysfs_do_create_link_sd(kn, target, name, 1); in sysfs_create_link_sd()
169 struct kernfs_node *parent, *kn = NULL; in sysfs_rename_link_ns() local
182 kn = kernfs_find_and_get_ns(parent, old, old_ns); in sysfs_rename_link_ns()
183 if (!kn) in sysfs_rename_link_ns()
[all …]
/OK3568_Linux_fs/kernel/arch/x86/kernel/cpu/resctrl/
H A Drdtgroup.c189 static int rdtgroup_kn_set_ugid(struct kernfs_node *kn) in rdtgroup_kn_set_ugid() argument
199 return kernfs_setattr(kn, &iattr); in rdtgroup_kn_set_ugid()
204 struct kernfs_node *kn; in rdtgroup_add_file() local
207 kn = __kernfs_create_file(parent_kn, rft->name, rft->mode, in rdtgroup_add_file()
210 if (IS_ERR(kn)) in rdtgroup_add_file()
211 return PTR_ERR(kn); in rdtgroup_add_file()
213 ret = rdtgroup_kn_set_ugid(kn); in rdtgroup_add_file()
215 kernfs_remove(kn); in rdtgroup_add_file()
225 struct rftype *rft = of->kn->priv; in rdtgroup_seqfile_show()
235 struct rftype *rft = of->kn->priv; in rdtgroup_file_write()
[all …]
H A Dctrlmondata.c312 rdtgrp = rdtgroup_kn_lock_live(of->kn); in rdtgroup_schemata_write()
314 rdtgroup_kn_unlock(of->kn); in rdtgroup_schemata_write()
369 rdtgroup_kn_unlock(of->kn); in rdtgroup_schemata_write()
402 rdtgrp = rdtgroup_kn_lock_live(of->kn); in rdtgroup_schemata_show()
428 rdtgroup_kn_unlock(of->kn); in rdtgroup_schemata_show()
460 rdtgrp = rdtgroup_kn_lock_live(of->kn); in rdtgroup_mondata_show()
466 md.priv = of->kn->priv; in rdtgroup_mondata_show()
488 rdtgroup_kn_unlock(of->kn); in rdtgroup_mondata_show()
/OK3568_Linux_fs/kernel/kernel/cgroup/
H A Dcgroup.c644 struct cgroup *cgrp = of->kn->parent->priv; in of_css()
1302 struct cgroup *root_cgrp = kf_root->kn->priv; in cgroup_root_from_kf()
1579 void cgroup_kn_unlock(struct kernfs_node *kn) in cgroup_kn_unlock() argument
1583 if (kernfs_type(kn) == KERNFS_DIR) in cgroup_kn_unlock()
1584 cgrp = kn->priv; in cgroup_kn_unlock()
1586 cgrp = kn->parent->priv; in cgroup_kn_unlock()
1590 kernfs_unbreak_active_protection(kn); in cgroup_kn_unlock()
1611 struct cgroup *cgroup_kn_lock_live(struct kernfs_node *kn, bool drain_offline) in cgroup_kn_lock_live() argument
1615 if (kernfs_type(kn) == KERNFS_DIR) in cgroup_kn_lock_live()
1616 cgrp = kn->priv; in cgroup_kn_lock_live()
[all …]
H A Ddebug.c48 if (!cgroup_kn_lock_live(of->kn, false)) in current_css_set_read()
72 cgroup_kn_unlock(of->kn); in current_css_set_read()
212 cgrp = cgroup_kn_lock_live(of->kn, false); in cgroup_subsys_states_read()
232 cgroup_kn_unlock(of->kn); in cgroup_subsys_states_read()
260 cgrp = cgroup_kn_lock_live(of->kn, false); in cgroup_masks_read()
267 cgroup_kn_unlock(of->kn); in cgroup_masks_read()
H A Dcgroup-v1.c501 cgrp = cgroup_kn_lock_live(of->kn, false); in __cgroup1_procs_write()
532 cgroup_kn_unlock(of->kn); in __cgroup1_procs_write()
566 cgrp = cgroup_kn_lock_live(of->kn, false); in cgroup_release_agent_write()
573 cgroup_kn_unlock(of->kn); in cgroup_release_agent_write()
706 struct kernfs_node *kn = kernfs_node_from_dentry(dentry); in cgroupstats_build() local
712 if (dentry->d_sb->s_type != &cgroup_fs_type || !kn || in cgroupstats_build()
713 kernfs_type(kn) != KERNFS_DIR) in cgroupstats_build()
724 cgrp = rcu_dereference(*(void __rcu __force **)&kn->priv); in cgroupstats_build()
835 static int cgroup1_rename(struct kernfs_node *kn, struct kernfs_node *new_parent, in cgroup1_rename() argument
838 struct cgroup *cgrp = kn->priv; in cgroup1_rename()
[all …]
H A Dcgroup-internal.h231 struct cgroup *cgroup_kn_lock_live(struct kernfs_node *kn, bool drain_offline);
232 void cgroup_kn_unlock(struct kernfs_node *kn);
262 int cgroup_rmdir(struct kernfs_node *kn);
/OK3568_Linux_fs/kernel/drivers/net/ethernet/apm/xgene/
H A Dxgene_enet_cle.c50 static void xgene_cle_kn_to_hw(struct xgene_cle_ptree_kn *kn, u32 *buf) in xgene_cle_kn_to_hw() argument
55 buf[j++] = SET_VAL(CLE_TYPE, kn->node_type); in xgene_cle_kn_to_hw()
56 for (i = 0; i < kn->num_keys; i++) { in xgene_cle_kn_to_hw()
57 struct xgene_cle_ptree_key *key = &kn->key[i]; in xgene_cle_kn_to_hw()
569 struct xgene_cle_ptree_kn *kn = ptree->kn; in xgene_cle_setup_node() local
585 xgene_cle_kn_to_hw(&kn[j - num_dn], buf); in xgene_cle_setup_node()
767 struct xgene_cle_ptree_kn kn; in xgene_enet_cle_init() local
806 memset(&kn, 0, sizeof(kn)); in xgene_enet_cle_init()
807 kn.node_type = KN; in xgene_enet_cle_init()
808 kn.num_keys = 1; in xgene_enet_cle_init()
[all …]
/OK3568_Linux_fs/kernel/scripts/gdb/linux/
H A Ddevice.py73 for kn in klist_for_each(bus['p']['klist_devices']):
74 dp = container_of(kn, device_private_type.get_type().pointer(), 'knode_bus')
79 for kn in klist_for_each(cls['p']['klist_devices']):
80 dp = container_of(kn, device_private_type.get_type().pointer(), 'knode_class')
85 for kn in klist_for_each(dev['p']['klist_children']):
86 dp = container_of(kn, device_private_type.get_type().pointer(), 'knode_parent')
/OK3568_Linux_fs/kernel/arch/s390/pci/
H A Dpci_sysfs.c55 struct kernfs_node *kn; in recover_store() local
70 kn = sysfs_break_active_protection(&dev->kobj, &attr->attr); in recover_store()
71 WARN_ON_ONCE(!kn); in recover_store()
96 if (kn) in recover_store()
97 sysfs_unbreak_active_protection(kn); in recover_store()
/OK3568_Linux_fs/kernel/drivers/of/
H A Dkobj.c43 struct kernfs_node *kn; in safe_name() local
47 while (i < 16 && (kn = sysfs_get_dirent(kobj->sd, name))) { in safe_name()
48 sysfs_put(kn); in safe_name()
/OK3568_Linux_fs/yocto/poky/meta/classes/
H A Dtoaster.bbclass103 kn, kv = line.strip().split(": ", 1)
104 m = re.match(r"^PKG:([^A-Z:]*)", kn)
107 kn = kn.split(":")[0]
108 pkgdata[kn] = kv
109 if kn.startswith('FILES_INFO'):
110 pkgdata[kn] = json.loads(kv)
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/usr/share/i18n/locales/
H A Ddsb_DE233 name_miss "kn<U011B><U017E>na"
234 name_mr "kn<U011B>z"
235 name_mrs "kn<U011B>ni"
236 name_ms "kn<U011B>ni"

123