Lines Matching refs:ns

39 		struct ns_common *ns = inode->i_private;  in ns_prune_dentry()  local
40 atomic_long_set(&ns->stashed, 0); in ns_prune_dentry()
53 struct ns_common *ns = inode->i_private; in nsfs_evict() local
55 ns->ops->put(ns); in nsfs_evict()
58 static int __ns_get_path(struct path *path, struct ns_common *ns) in __ns_get_path() argument
66 d = atomic_long_read(&ns->stashed); in __ns_get_path()
73 ns->ops->put(ns); in __ns_get_path()
82 ns->ops->put(ns); in __ns_get_path()
85 inode->i_ino = ns->inum; in __ns_get_path()
90 inode->i_private = ns; in __ns_get_path()
98 dentry->d_fsdata = (void *)ns->ops; in __ns_get_path()
99 d = atomic_long_cmpxchg(&ns->stashed, 0, (unsigned long)dentry); in __ns_get_path()
115 struct ns_common *ns = ns_get_cb(private_data); in ns_get_path_cb() local
116 if (!ns) in ns_get_path_cb()
118 ret = __ns_get_path(path, ns); in ns_get_path_cb()
147 int open_related_ns(struct ns_common *ns, in open_related_ns() argument
148 struct ns_common *(*get_ns)(struct ns_common *ns)) in open_related_ns() argument
162 relative = get_ns(ns); in open_related_ns()
192 struct ns_common *ns = get_proc_ns(file_inode(filp)); in ns_ioctl() local
198 return open_related_ns(ns, ns_get_owner); in ns_ioctl()
200 if (!ns->ops->get_parent) in ns_ioctl()
202 return open_related_ns(ns, ns->ops->get_parent); in ns_ioctl()
204 return ns->ops->type; in ns_ioctl()
206 if (ns->ops->type != CLONE_NEWUSER) in ns_ioctl()
208 user_ns = container_of(ns, struct user_namespace, ns); in ns_ioctl()
220 struct ns_common *ns; in ns_get_name() local
223 ns = ns_ops->get(task); in ns_get_name()
224 if (ns) { in ns_get_name()
226 res = snprintf(buf, size, "%s:[%u]", name, ns->inum); in ns_get_name()
227 ns_ops->put(ns); in ns_get_name()
263 bool ns_match(const struct ns_common *ns, dev_t dev, ino_t ino) in ns_match() argument
265 return (ns->inum == ino) && (nsfs_mnt->mnt_sb->s_dev == dev); in ns_match()