Lines Matching refs:kn
29 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()
68 while (kn->parent && base != kn) in kernfs_get_target_path()
69 kn = kn->parent; in kernfs_get_target_path()
71 if (base == kn) in kernfs_get_target_path()
83 kn = target; in kernfs_get_target_path()
84 while (kn->parent && kn != base) { in kernfs_get_target_path()
85 len += strlen(kn->name) + 1; in kernfs_get_target_path()
86 kn = kn->parent; in kernfs_get_target_path()
97 kn = target; in kernfs_get_target_path()
98 while (kn->parent && kn != base) { in kernfs_get_target_path()
99 int slen = strlen(kn->name); in kernfs_get_target_path()
102 memcpy(s + len, kn->name, slen); in kernfs_get_target_path()
106 kn = kn->parent; in kernfs_get_target_path()
114 struct kernfs_node *kn = inode->i_private; in kernfs_getlink() local
115 struct kernfs_node *parent = kn->parent; in kernfs_getlink()
116 struct kernfs_node *target = kn->symlink.target_kn; in kernfs_getlink()