Lines Matching refs:path

27  * With RCU path tracing, it may race with d_move(). Use READ_ONCE() to
59 * prepend_path - Prepend path string to a buffer
60 * @path: the dentry/vfsmount to report
75 static int prepend_path(const struct path *path,
76 const struct path *root,
96 dentry = path->dentry;
97 vfsmnt = path->mnt;
165 * __d_path - return the path of a dentry
166 * @path: the dentry/vfsmount to report
171 * Convert a dentry into an ASCII path name.
174 * path was too long.
178 * If the path is not reachable from the supplied root, return %NULL.
180 char *__d_path(const struct path *path,
181 const struct path *root,
188 error = prepend_path(path, root, &res, &buflen);
197 char *d_absolute_path(const struct path *path,
200 struct path root = {};
205 error = prepend_path(path, &root, &res, &buflen);
217 static int path_with_deleted(const struct path *path,
218 const struct path *root,
222 if (d_unlinked(path->dentry)) {
228 return prepend_path(path, root, buf, buflen);
236 static void get_fs_root_rcu(struct fs_struct *fs, struct path *root)
247 * d_path - return the path of a dentry
248 * @path: path to report
252 * Convert a dentry into an ASCII path name. If the entry has been deleted
255 * Returns a pointer into the buffer or an error code if the path was
262 char *d_path(const struct path *path, char *buf, int buflen)
265 struct path root;
276 * path->dentry == path->mnt->mnt_root. In that case don't call d_dname
277 * and instead have d_path return the mounted path.
279 if (path->dentry->d_op && path->dentry->d_op->d_dname &&
280 (!IS_ROOT(path->dentry) || path->dentry != path->mnt->mnt_root))
281 return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
285 error = path_with_deleted(path, &root, &res, &buflen);
399 static void get_fs_root_and_pwd_rcu(struct fs_struct *fs, struct path *root,
400 struct path *pwd)
432 struct path pwd, root;