switch dentry_open() to struct path, make it grab references itself
[firefly-linux-kernel-4.4.55.git] / fs / autofs4 / dev-ioctl.c
index aa9103f8f01bf8d3bad8d0dcbcc8036895226e3f..abf645c1703bab0036dcb76db1acb570590a3cd5 100644 (file)
@@ -257,8 +257,8 @@ static int autofs_dev_ioctl_open_mountpoint(const char *name, dev_t devid)
                 * corresponding to the autofs fs we want to open.
                 */
 
-               filp = dentry_open(path.dentry, path.mnt, O_RDONLY,
-                                  current_cred());
+               filp = dentry_open(&path, O_RDONLY, current_cred());
+               path_put(&path);
                if (IS_ERR(filp)) {
                        err = PTR_ERR(filp);
                        goto out;