Lines Matching defs:path

15 #include <linux/path.h>
21 #include "include/path.h"
37 /* If the path is not connected to the expected root,
41 * specifically directed to connect the path,
43 * if in a chroot and doing chroot relative paths and the path
48 static int disconnect(const struct path *path, char *buf, char **name,
55 our_mnt(path->mnt))) {
56 /* disconnected path, don't return pathname starting
75 * d_namespace_path - lookup a name associated with a given path
76 * @path: path to lookup (NOT NULL)
77 * @buf: buffer to store path to (NOT NULL)
78 * @name: Returns - pointer for start of path name with in @buf (NOT NULL)
79 * @flags: flags controlling path lookup
82 * Handle path name lookup.
84 * Returns: %0 else error code if path lookup fails
85 * When no error the path name is returned in @name which points to
88 static int d_namespace_path(const struct path *path, char *buf, char **name,
97 if (path->mnt->mnt_flags & MNT_INTERNAL) {
99 res = dentry_path(path->dentry, buf, buflen);
105 if (path->dentry->d_sb->s_magic == PROC_SUPER_MAGIC &&
113 error = disconnect(path, buf, name, flags,
120 struct path root;
122 res = __d_path(path, &root, buf, buflen);
125 res = d_absolute_path(path, buf, buflen);
126 if (!our_mnt(path->mnt))
130 /* handle error conditions - and still allow a partial path to
140 res = dentry_path_raw(path->dentry, buf, buflen);
146 } else if (!our_mnt(path->mnt))
152 error = disconnect(path, buf, name, flags, disconnected);
160 if (d_unlinked(path->dentry) && d_is_positive(path->dentry) &&
179 * @path: path the file (NOT NULL)
180 * @flags: flags controlling path name generation
182 * @name: Returns - the generated path name if !error (NOT NULL)
183 * @info: Returns - information on why the path lookup failed (MAYBE NULL)
197 int aa_path_name(const struct path *path, int flags, char *buffer,
201 int error = d_namespace_path(path, buffer, &str, flags, disconnected);
207 *info = "Failed name lookup - disconnected path";