Skip to content

Commit

Permalink
ovl: remove not used argument in ovl_check_origin
Browse files Browse the repository at this point in the history
ovl_check_origin outparam 'ctrp' argument not used by caller.  So remove
this argument.

Signed-off-by: youngjun <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
youngjun-89 authored and Miklos Szeredi committed Jul 15, 2020
1 parent 5ac8e80 commit d78a0dc
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions fs/overlayfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected,
}

static int ovl_check_origin(struct ovl_fs *ofs, struct dentry *upperdentry,
struct ovl_path **stackp, unsigned int *ctrp)
struct ovl_path **stackp)
{
struct ovl_fh *fh = ovl_get_fh(upperdentry, OVL_XATTR_ORIGIN);
int err;
Expand All @@ -406,10 +406,6 @@ static int ovl_check_origin(struct ovl_fs *ofs, struct dentry *upperdentry,
return err;
}

if (WARN_ON(*ctrp))
return -EIO;

*ctrp = 1;
return 0;
}

Expand Down Expand Up @@ -861,8 +857,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
goto out;
}
if (upperdentry && !d.is_dir) {
unsigned int origin_ctr = 0;

/*
* Lookup copy up origin by decoding origin file handle.
* We may get a disconnected dentry, which is fine,
Expand All @@ -873,8 +867,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
* number - it's the same as if we held a reference
* to a dentry in lower layer that was moved under us.
*/
err = ovl_check_origin(ofs, upperdentry, &origin_path,
&origin_ctr);
err = ovl_check_origin(ofs, upperdentry, &origin_path);
if (err)
goto out_put_upper;

Expand Down

0 comments on commit d78a0dc

Please sign in to comment.