From 26150ab5eae16cef151d5e6ad5b5b38544dbf88a Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 2 Sep 2020 10:58:48 +0200 Subject: [PATCH] ovl: drop flags argument from ovl_do_setxattr() All callers pass zero flags to ovl_do_setxattr(). So drop this argument. Signed-off-by: Miklos Szeredi --- fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/inode.c | 2 +- fs/overlayfs/namei.c | 2 +- fs/overlayfs/overlayfs.h | 8 ++++---- fs/overlayfs/super.c | 2 +- fs/overlayfs/util.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index ebce234..4dd5a1b 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -364,7 +364,7 @@ static int ovl_set_upper_fh(struct dentry *upper, struct dentry *index) if (IS_ERR(fh)) return PTR_ERR(fh); - err = ovl_do_setxattr(index, OVL_XATTR_UPPER, fh->buf, fh->fb.len, 0); + err = ovl_do_setxattr(index, OVL_XATTR_UPPER, fh->buf, fh->fb.len); kfree(fh); return err; diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 3297a5d..3b7ed7c 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -723,7 +723,7 @@ static int ovl_set_nlink_common(struct dentry *dentry, return -EIO; return ovl_do_setxattr(ovl_dentry_upper(dentry), - OVL_XATTR_NLINK, buf, len, 0); + OVL_XATTR_NLINK, buf, len); } int ovl_set_nlink_upper(struct dentry *dentry) diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index 7b5ee84..18ccf74 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -456,7 +456,7 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name, err = ovl_verify_fh(dentry, name, fh); if (set && err == -ENODATA) - err = ovl_do_setxattr(dentry, name, fh->buf, fh->fb.len, 0); + err = ovl_do_setxattr(dentry, name, fh->buf, fh->fb.len); if (err) goto fail; diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index a5a7c19..5f10823 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -177,11 +177,11 @@ static inline ssize_t ovl_do_getxattr(struct dentry *dentry, const char *name, } static inline int ovl_do_setxattr(struct dentry *dentry, const char *name, - const void *value, size_t size, int flags) + const void *value, size_t size) { - int err = vfs_setxattr(dentry, name, value, size, flags); - pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0x%x) = %i\n", - dentry, name, min((int)size, 48), value, size, flags, err); + int err = vfs_setxattr(dentry, name, value, size, 0); + pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0) = %i\n", + dentry, name, min((int)size, 48), value, size, err); return err; } diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 9e4c6ce..fcfb32a 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1319,7 +1319,7 @@ static int ovl_make_workdir(struct super_block *sb, struct ovl_fs *ofs, /* * Check if upper/work fs supports trusted.overlay.* xattr */ - err = ovl_do_setxattr(ofs->workdir, OVL_XATTR_OPAQUE, "0", 1, 0); + err = ovl_do_setxattr(ofs->workdir, OVL_XATTR_OPAQUE, "0", 1); if (err) { ofs->noxattr = true; ofs->config.index = false; diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index d2a7765..7d86dba 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -582,7 +582,7 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry, if (ofs->noxattr) return xerr; - err = ovl_do_setxattr(upperdentry, name, value, size, 0); + err = ovl_do_setxattr(upperdentry, name, value, size); if (err == -EOPNOTSUPP) { pr_warn("cannot set %s xattr on upper\n", name); -- 2.7.4