Lines Matching defs:root

571 	struct path	root;
611 const struct path *root)
615 if (unlikely(root)) {
617 p->root = *root;
690 path_put(&nd->root);
745 /* Nothing to do if nd->root is zero or is managed by the VFS user. */
746 if (!nd->root.mnt || (nd->state & ND_ROOT_PRESET))
749 return legitimize_path(nd, &nd->root, nd->root_seq);
768 * try_to_unlazy attempts to legitimize the current nd->path and nd->root
806 * nd->path and nd->root for ref-walk mode. Must be called from rcu-walk context.
838 * Sequence counts matched. Now make sure that the root is
884 * We don't want to zero nd->root for scoped-lookups or
885 * externally-managed nd->root.
889 nd->root.mnt = NULL;
898 * ever step outside the root during lookup" and should already
901 * scoped within the root at some point during the lookup.
906 * requested root to userspace.
908 * Userspace could move the path outside the root after this
910 * resolved file was inside the root at some point).
912 if (!path_is_under(&nd->path, &nd->root))
937 * Jumping to the real root in a scoped-lookup is a BUG in namei, but we
949 nd->root = fs->root;
950 nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq);
953 get_fs_root(fs, &nd->root);
965 if (nd->path.mnt != NULL && nd->path.mnt != nd->root.mnt)
968 if (!nd->root.mnt) {
975 nd->path = nd->root;
983 nd->path = nd->root;
1272 * root.
1297 static bool choose_mountpoint_rcu(struct mount *m, const struct path *root,
1304 if (unlikely(root->dentry == mountpoint &&
1305 root->mnt == &m->mnt))
1317 static bool choose_mountpoint(struct mount *m, const struct path *root,
1326 found = choose_mountpoint_rcu(m, root, path, &seq);
1879 if (path_equal(&nd->path, &nd->root))
1885 &nd->root, &path, &seq))
1919 if (path_equal(&nd->path, &nd->root))
1925 &nd->root, &path))
1953 if (!nd->root.mnt) {
1972 * above nd->root (and so userspace should retry or use
1990 * to be able to know about the current root directory and
2374 struct dentry *root = nd->root.dentry;
2375 struct inode *inode = root->d_inode;
2376 if (*s && unlikely(!d_can_lookup(root)))
2378 nd->path = nd->root;
2389 nd->root.mnt = NULL;
2391 /* Absolute pathname -- fetch the root (LOOKUP_IN_ROOT uses nd->dfd). */
2441 /* For scoped-lookups we need to set the root to the dirfd as well. */
2443 nd->root = nd->path;
2447 path_get(&nd->root);
2505 struct path *path, struct path *root)
2511 set_nameidata(&nd, dfd, name, root);
2546 const struct path *root)
2553 set_nameidata(&nd, dfd, name, root);
2625 * @root: pointer to struct path of the base directory
2629 const struct path *root)
2632 type, root);
2649 struct path root = {.mnt = mnt, .dentry = dentry};
2653 /* the first argument of filename_lookup() is ignored with root */
2654 ret = filename_lookup(AT_FDCWD, filename, flags, path, &root);
2947 * 10. We can't remove a root or mountpoint.
3827 struct file *do_file_open_root(const struct path *root,
3835 if (d_is_symlink(root->dentry) && op->intent & LOOKUP_OPEN)
3842 set_nameidata(&nd, -1, filename, root);