Lines Matching defs:path
77 * Copy parameter control struct, including a possible path allocated
107 * Check sanity of parameter control fields and if a path is present
122 err = invalid_str(param->path, param->size - AUTOFS_DEV_IOCTL_SIZE);
125 "path string terminator missing for cmd(0x%08x)\n",
130 err = check_name(param->path);
132 pr_warn("invalid path supplied for cmd(0x%08x)\n",
183 struct path *res,
184 int test(const struct path *path, void *data),
187 struct path path;
190 err = kern_path(pathname, LOOKUP_MOUNTPOINT, &path);
194 while (path.dentry == path.mnt->mnt_root) {
195 if (path.dentry->d_sb->s_magic == AUTOFS_SUPER_MAGIC) {
196 if (test(&path, data)) {
197 path_get(&path);
198 *res = path;
203 if (!follow_up(&path))
206 path_put(&path);
210 static int test_by_dev(const struct path *path, void *p)
212 return path->dentry->d_sb->s_dev == *(dev_t *)p;
215 static int test_by_type(const struct path *path, void *p)
217 struct autofs_info *ino = autofs_dentry_ino(path->dentry);
224 * to the given path and device number (aka. new_encode_dev(sb->s_dev)).
233 struct path path;
235 err = find_autofs_mount(name, &path, test_by_dev, &devid);
239 filp = dentry_open(&path, O_RDONLY, current_cred());
240 path_put(&path);
261 const char *path;
265 /* param->path has been checked in validate_dev_ioctl() */
272 path = param->path;
276 fd = autofs_dev_ioctl_open_mountpoint(path, devid);
424 struct path path;
428 /* param->path has been checked in validate_dev_ioctl() */
434 err = find_autofs_mount(param->path, &path, test_by_dev, &devid);
438 ino = autofs_dentry_ino(path.dentry);
441 autofs_expire_wait(&path, 0);
449 path_put(&path);
483 * Check if the given path is a mountpoint.
487 * the path is considered a mountpoint if it is itself a
490 * path is a mount point and the super magic of the covering
494 * lookup the path and check if it is the root of a mount.
497 * located path is the root of a mount we return 1 along with
507 struct path path;
513 /* param->path has been checked in validate_dev_ioctl() */
515 name = param->path;
524 &path);
526 err = find_autofs_mount(name, &path,
530 devid = new_encode_dev(path.dentry->d_sb->s_dev);
532 if (path.mnt->mnt_root == path.dentry) {
534 magic = path.dentry->d_sb->s_magic;
539 err = find_autofs_mount(name, &path, test_by_dev, &dev);
545 err = path_has_submounts(&path);
547 if (follow_down_one(&path))
548 magic = path.dentry->d_sb->s_magic;
553 path_put(&path);