Commit 26150ab5 authored by Miklos Szeredi's avatar Miklos Szeredi

ovl: drop flags argument from ovl_do_setxattr()

All callers pass zero flags to ovl_do_setxattr().  So drop this argument.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 71097047
...@@ -364,7 +364,7 @@ static int ovl_set_upper_fh(struct dentry *upper, struct dentry *index) ...@@ -364,7 +364,7 @@ static int ovl_set_upper_fh(struct dentry *upper, struct dentry *index)
if (IS_ERR(fh)) if (IS_ERR(fh))
return PTR_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); kfree(fh);
return err; return err;
......
...@@ -723,7 +723,7 @@ static int ovl_set_nlink_common(struct dentry *dentry, ...@@ -723,7 +723,7 @@ static int ovl_set_nlink_common(struct dentry *dentry,
return -EIO; return -EIO;
return ovl_do_setxattr(ovl_dentry_upper(dentry), 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) int ovl_set_nlink_upper(struct dentry *dentry)
......
...@@ -456,7 +456,7 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name, ...@@ -456,7 +456,7 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name,
err = ovl_verify_fh(dentry, name, fh); err = ovl_verify_fh(dentry, name, fh);
if (set && err == -ENODATA) 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) if (err)
goto fail; goto fail;
......
...@@ -177,11 +177,11 @@ static inline ssize_t ovl_do_getxattr(struct dentry *dentry, const char *name, ...@@ -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, 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); int err = vfs_setxattr(dentry, name, value, size, 0);
pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0x%x) = %i\n", pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0) = %i\n",
dentry, name, min((int)size, 48), value, size, flags, err); dentry, name, min((int)size, 48), value, size, err);
return err; return err;
} }
......
...@@ -1319,7 +1319,7 @@ static int ovl_make_workdir(struct super_block *sb, struct ovl_fs *ofs, ...@@ -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 * 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) { if (err) {
ofs->noxattr = true; ofs->noxattr = true;
ofs->config.index = false; ofs->config.index = false;
......
...@@ -582,7 +582,7 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry, ...@@ -582,7 +582,7 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry,
if (ofs->noxattr) if (ofs->noxattr)
return xerr; return xerr;
err = ovl_do_setxattr(upperdentry, name, value, size, 0); err = ovl_do_setxattr(upperdentry, name, value, size);
if (err == -EOPNOTSUPP) { if (err == -EOPNOTSUPP) {
pr_warn("cannot set %s xattr on upper\n", name); pr_warn("cannot set %s xattr on upper\n", name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment