LOOKUP_MOUNTPOINT: fold path_mountpointat() into path_lookupat()
New LOOKUP flag, telling path_lookupat() to act as path_mountpointat(). IOW, traverse mounts at the final point and skip revalidation of the location where it ends up. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -186,7 +186,7 @@ static int find_autofs_mount(const char *pathname,
|
||||
struct path path;
|
||||
int err;
|
||||
|
||||
err = kern_path_mountpoint(AT_FDCWD, pathname, &path, 0);
|
||||
err = kern_path(pathname, LOOKUP_MOUNTPOINT, &path);
|
||||
if (err)
|
||||
return err;
|
||||
err = -ENOENT;
|
||||
@@ -519,8 +519,8 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
|
||||
|
||||
if (!fp || param->ioctlfd == -1) {
|
||||
if (autofs_type_any(type))
|
||||
err = kern_path_mountpoint(AT_FDCWD,
|
||||
name, &path, LOOKUP_FOLLOW);
|
||||
err = kern_path(name, LOOKUP_FOLLOW | LOOKUP_MOUNTPOINT,
|
||||
&path);
|
||||
else
|
||||
err = find_autofs_mount(name, &path,
|
||||
test_by_type, &type);
|
||||
|
Reference in New Issue
Block a user