From d9768076068f81687b3dbddbd76b5e108f5d53d0 Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Sun, 24 Sep 2017 13:00:19 +0300 Subject: ovl: remove unneeded arg from ovl_verify_origin() Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi --- fs/overlayfs/namei.c | 4 ++-- fs/overlayfs/overlayfs.h | 4 ++-- fs/overlayfs/super.c | 8 +++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index 7d4099143a57..625ed8066570 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -348,8 +348,8 @@ static int ovl_verify_origin_fh(struct dentry *dentry, const struct ovl_fh *fh) * * Return 0 on match, -ESTALE on mismatch, < 0 on error. */ -int ovl_verify_origin(struct dentry *dentry, struct vfsmount *mnt, - struct dentry *origin, bool is_upper, bool set) +int ovl_verify_origin(struct dentry *dentry, struct dentry *origin, + bool is_upper, bool set) { struct inode *inode; struct ovl_fh *fh; diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index cefe5a97d048..13eab09a6b6f 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -249,8 +249,8 @@ static inline bool ovl_is_impuredir(struct dentry *dentry) /* namei.c */ -int ovl_verify_origin(struct dentry *dentry, struct vfsmount *mnt, - struct dentry *origin, bool is_upper, bool set); +int ovl_verify_origin(struct dentry *dentry, struct dentry *origin, + bool is_upper, bool set); int ovl_verify_index(struct dentry *index, struct ovl_path *lower, unsigned int numlower); int ovl_get_index_name(struct dentry *origin, struct qstr *name); diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 3156e908423e..be03578181d2 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -983,9 +983,7 @@ static int ovl_get_indexdir(struct ovl_fs *ofs, struct ovl_entry *oe, int err; /* Verify lower root is upper root origin */ - err = ovl_verify_origin(upperpath->dentry, - oe->lowerstack[0].layer->mnt, - oe->lowerstack[0].dentry, + err = ovl_verify_origin(upperpath->dentry, oe->lowerstack[0].dentry, false, true); if (err) { pr_err("overlayfs: failed to verify upper root origin\n"); @@ -995,8 +993,8 @@ static int ovl_get_indexdir(struct ovl_fs *ofs, struct ovl_entry *oe, ofs->indexdir = ovl_workdir_create(ofs, OVL_INDEXDIR_NAME, true); if (ofs->indexdir) { /* Verify upper root is index dir origin */ - err = ovl_verify_origin(ofs->indexdir, ofs->upper_mnt, - upperpath->dentry, true, true); + err = ovl_verify_origin(ofs->indexdir, upperpath->dentry, + true, true); if (err) pr_err("overlayfs: failed to verify index dir origin\n"); -- cgit v1.2.3