... and shift filling struct path to just before the call of
handle_mounts(). All callers of handle_mounts() are
immediately preceded by path->mnt = nd->path.mnt now.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
error = PTR_ERR(dentry);
goto out;
}
- path.mnt = nd->path.mnt;
- path.dentry = dentry;
if (file->f_mode & FMODE_OPENED) {
if ((file->f_mode & FMODE_CREATED) ||
open_flag &= ~O_TRUNC;
will_truncate = false;
acc_mode = 0;
- path_to_nameidata(&path, nd);
+ dput(nd->path.dentry);
+ nd->path.dentry = dentry;
goto finish_open_created;
}
got_write = false;
}
+ path.mnt = nd->path.mnt;
+ path.dentry = dentry;
error = handle_mounts(&path, nd, &inode, &seq);
if (unlikely(error < 0))
return error;