Lines Matching refs:root

505 	struct path	root;
604 path_put(&nd->root);
661 * For scoped-lookups (where nd->root has been zeroed), we need to
663 * for these lookups (nd->dfd is the root, not the filesystem root).
665 if (!nd->root.mnt && (nd->flags & LOOKUP_IS_SCOPED))
667 /* Nothing to do if nd->root is zero or is managed by the VFS user. */
668 if (!nd->root.mnt || (nd->state & ND_ROOT_PRESET))
671 return legitimize_path(nd, &nd->root, nd->root_seq);
690 * try_to_unlazy attempts to legitimize the current nd->path and nd->root
730 * nd->path and nd->root for ref-walk mode. Must be called from rcu-walk context.
758 * Sequence counts matched. Now make sure that the root is
804 * We don't want to zero nd->root for scoped-lookups or
805 * externally-managed nd->root.
809 nd->root.mnt = NULL;
818 * ever step outside the root during lookup" and should already
821 * scoped within the root at some point during the lookup.
826 * requested root to userspace.
828 * Userspace could move the path outside the root after this
830 * resolved file was inside the root at some point).
832 if (!path_is_under(&nd->path, &nd->root))
857 * Jumping to the real root in a scoped-lookup is a BUG in namei, but we
869 nd->root = fs->root;
870 nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq);
873 get_fs_root(fs, &nd->root);
885 if (nd->path.mnt != NULL && nd->path.mnt != nd->root.mnt)
888 if (!nd->root.mnt) {
895 nd->path = nd->root;
903 nd->path = nd->root;
1116 * root.
1141 static bool choose_mountpoint_rcu(struct mount *m, const struct path *root,
1148 if (unlikely(root->dentry == mountpoint &&
1149 root->mnt == &m->mnt))
1161 static bool choose_mountpoint(struct mount *m, const struct path *root,
1170 found = choose_mountpoint_rcu(m, root, path, &seq);
1739 if (path_equal(&nd->path, &nd->root))
1745 &nd->root, &path, &seq))
1779 if (path_equal(&nd->path, &nd->root))
1785 &nd->root, &path))
1818 if (!nd->root.mnt) {
1842 * above nd->root (and so userspace should retry or use
1862 * to be able to know about the current root directory and
2241 struct dentry *root = nd->root.dentry;
2242 struct inode *inode = root->d_inode;
2243 if (*s && unlikely(!d_can_lookup(root)))
2245 nd->path = nd->root;
2256 nd->root.mnt = NULL;
2258 /* Absolute pathname -- fetch the root (LOOKUP_IN_ROOT uses nd->dfd). */
2308 /* For scoped-lookups we need to set the root to the dirfd as well. */
2310 nd->root = nd->path;
2314 path_get(&nd->root);
2372 struct path *path, struct path *root)
2379 if (unlikely(root)) {
2380 nd.root = *root;
2487 struct path root = {.mnt = mnt, .dentry = dentry};
2488 /* the first argument of filename_lookup() is ignored with root */
2490 flags , path, &root);
2696 * 10. We can't remove a root or mountpoint.
3468 struct file *do_file_open_root(const struct path *root,
3476 if (d_is_symlink(root->dentry) && op->intent & LOOKUP_OPEN)
3484 nd.root = *root;