Lines Matching refs:kn
29 struct kernfs_node *kn; in kernfs_create_link() local
39 kn = kernfs_new_node(parent, name, S_IFLNK|0777, uid, gid, KERNFS_LINK); in kernfs_create_link()
40 if (!kn) in kernfs_create_link()
44 kn->ns = target->ns; in kernfs_create_link()
45 kn->symlink.target_kn = target; in kernfs_create_link()
48 error = kernfs_add_one(kn); in kernfs_create_link()
50 return kn; in kernfs_create_link()
52 kernfs_put(kn); in kernfs_create_link()
59 struct kernfs_node *base, *kn; in kernfs_get_target_path() local
66 kn = target->parent; in kernfs_get_target_path()
67 while (kn->parent && base != kn) in kernfs_get_target_path()
68 kn = kn->parent; in kernfs_get_target_path()
70 if (base == kn) in kernfs_get_target_path()
82 kn = target; in kernfs_get_target_path()
83 while (kn->parent && kn != base) { in kernfs_get_target_path()
84 len += strlen(kn->name) + 1; in kernfs_get_target_path()
85 kn = kn->parent; in kernfs_get_target_path()
96 kn = target; in kernfs_get_target_path()
97 while (kn->parent && kn != base) { in kernfs_get_target_path()
98 int slen = strlen(kn->name); in kernfs_get_target_path()
101 memcpy(s + len, kn->name, slen); in kernfs_get_target_path()
105 kn = kn->parent; in kernfs_get_target_path()
113 struct kernfs_node *kn = inode->i_private; in kernfs_getlink() local
114 struct kernfs_node *parent = kn->parent; in kernfs_getlink()
115 struct kernfs_node *target = kn->symlink.target_kn; in kernfs_getlink()