Skip to content

Commit 26150ab

Browse files
author
Miklos Szeredi
committed
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 <mszeredi@redhat.com>
1 parent 7109704 commit 26150ab

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

fs/overlayfs/copy_up.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ static int ovl_set_upper_fh(struct dentry *upper, struct dentry *index)
364364
if (IS_ERR(fh))
365365
return PTR_ERR(fh);
366366

367-
err = ovl_do_setxattr(index, OVL_XATTR_UPPER, fh->buf, fh->fb.len, 0);
367+
err = ovl_do_setxattr(index, OVL_XATTR_UPPER, fh->buf, fh->fb.len);
368368

369369
kfree(fh);
370370
return err;

fs/overlayfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ static int ovl_set_nlink_common(struct dentry *dentry,
723723
return -EIO;
724724

725725
return ovl_do_setxattr(ovl_dentry_upper(dentry),
726-
OVL_XATTR_NLINK, buf, len, 0);
726+
OVL_XATTR_NLINK, buf, len);
727727
}
728728

729729
int ovl_set_nlink_upper(struct dentry *dentry)

fs/overlayfs/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name,
456456

457457
err = ovl_verify_fh(dentry, name, fh);
458458
if (set && err == -ENODATA)
459-
err = ovl_do_setxattr(dentry, name, fh->buf, fh->fb.len, 0);
459+
err = ovl_do_setxattr(dentry, name, fh->buf, fh->fb.len);
460460
if (err)
461461
goto fail;
462462

fs/overlayfs/overlayfs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ static inline ssize_t ovl_do_getxattr(struct dentry *dentry, const char *name,
177177
}
178178

179179
static inline int ovl_do_setxattr(struct dentry *dentry, const char *name,
180-
const void *value, size_t size, int flags)
180+
const void *value, size_t size)
181181
{
182-
int err = vfs_setxattr(dentry, name, value, size, flags);
183-
pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0x%x) = %i\n",
184-
dentry, name, min((int)size, 48), value, size, flags, err);
182+
int err = vfs_setxattr(dentry, name, value, size, 0);
183+
pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0) = %i\n",
184+
dentry, name, min((int)size, 48), value, size, err);
185185
return err;
186186
}
187187

fs/overlayfs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ static int ovl_make_workdir(struct super_block *sb, struct ovl_fs *ofs,
13191319
/*
13201320
* Check if upper/work fs supports trusted.overlay.* xattr
13211321
*/
1322-
err = ovl_do_setxattr(ofs->workdir, OVL_XATTR_OPAQUE, "0", 1, 0);
1322+
err = ovl_do_setxattr(ofs->workdir, OVL_XATTR_OPAQUE, "0", 1);
13231323
if (err) {
13241324
ofs->noxattr = true;
13251325
ofs->config.index = false;

fs/overlayfs/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry,
582582
if (ofs->noxattr)
583583
return xerr;
584584

585-
err = ovl_do_setxattr(upperdentry, name, value, size, 0);
585+
err = ovl_do_setxattr(upperdentry, name, value, size);
586586

587587
if (err == -EOPNOTSUPP) {
588588
pr_warn("cannot set %s xattr on upper\n", name);

0 commit comments

Comments
 (0)