Lines Matching full: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, in disconnect() argument
55 our_mnt(path->mnt))) { in disconnect()
56 /* disconnected path, don't return pathname starting in disconnect()
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, in d_namespace_path() argument
97 if (path->mnt->mnt_flags & MNT_INTERNAL) { in d_namespace_path()
99 res = dentry_path(path->dentry, buf, buflen); in d_namespace_path()
105 if (path->dentry->d_sb->s_magic == PROC_SUPER_MAGIC && in d_namespace_path()
113 error = disconnect(path, buf, name, flags, in d_namespace_path()
120 struct path root; in d_namespace_path()
122 res = __d_path(path, &root, buf, buflen); in d_namespace_path()
125 res = d_absolute_path(path, buf, buflen); in d_namespace_path()
126 if (!our_mnt(path->mnt)) in d_namespace_path()
130 /* handle error conditions - and still allow a partial path to in d_namespace_path()
140 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path()
146 } else if (!our_mnt(path->mnt)) in d_namespace_path()
152 error = disconnect(path, buf, name, flags, disconnected); in d_namespace_path()
160 if (d_unlinked(path->dentry) && d_is_positive(path->dentry) && in d_namespace_path()
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, in aa_path_name() argument
201 int error = d_namespace_path(path, buffer, &str, flags, disconnected); in aa_path_name()
207 *info = "Failed name lookup - disconnected path"; in aa_path_name()