diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2017-07-04 22:03:18 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-07-04 22:03:18 +0200 |
commit | 7ab8b1763fd84ff4e7263ed7f5c728e4cb3f364a (patch) | |
tree | 1783c0190d10d2716bbfbd2725e2b89d4b219fa9 /fs/overlayfs | |
parent | 02209d10709c18d552c2494df74117db09a18e05 (diff) | |
download | linux-7ab8b1763fd84ff4e7263ed7f5c728e4cb3f364a.tar.gz linux-7ab8b1763fd84ff4e7263ed7f5c728e4cb3f364a.tar.bz2 linux-7ab8b1763fd84ff4e7263ed7f5c728e4cb3f364a.zip |
ovl: base tmpfile in workdir too
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r-- | fs/overlayfs/copy_up.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index 81b9a44916a0..1264f2434047 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -345,8 +345,7 @@ static int ovl_install_temp(struct dentry *workdir, struct dentry *upperdir, return err; } -static int ovl_get_tmpfile(struct dentry *workdir, struct dentry *upperdir, - struct dentry *dentry, +static int ovl_get_tmpfile(struct dentry *workdir, struct dentry *dentry, struct kstat *stat, const char *link, bool tmpfile, struct dentry **tempp) { @@ -369,7 +368,7 @@ static int ovl_get_tmpfile(struct dentry *workdir, struct dentry *upperdir, old_creds = override_creds(new_creds); if (tmpfile) { - temp = ovl_do_tmpfile(upperdir, stat->mode); + temp = ovl_do_tmpfile(workdir, stat->mode); if (IS_ERR(temp)) goto temp_err; } else { @@ -453,8 +452,7 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir, struct dentry *temp = NULL; int err; - err = ovl_get_tmpfile(workdir, upperdir, dentry, stat, link, tmpfile, - &temp); + err = ovl_get_tmpfile(workdir, dentry, stat, link, tmpfile, &temp); if (err) goto out; |