Skip to content

Commit

Permalink
ovl: base tmpfile in workdir too
Browse files Browse the repository at this point in the history
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Miklos Szeredi committed Jul 4, 2017
1 parent 02209d1 commit 7ab8b17
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fs/overlayfs/copy_up.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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 {
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 7ab8b17

Please sign in to comment.