On Wed, Oct 18, 2017 at 12:05 AM, Vivek Goyal <vgoyal@xxxxxxxxxx> wrote: > At mount time we check if upper supports xattr or not and set ofs->noxattr > field accordingly. But in ovl_check_setxattr() still seems to have logic > which expects that ovl_do_setxattr() can return -EOPNOTSUPP. Not sure when > and how can we hit this code. Feels redundant to me. So I am removing > this code. > > Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx> Looks good Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- > fs/overlayfs/util.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c > index b9b239fa5cfd..a4ce1c9944f0 100644 > --- a/fs/overlayfs/util.c > +++ b/fs/overlayfs/util.c > @@ -348,21 +348,12 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry, > const char *name, const void *value, size_t size, > int xerr) > { > - int err; > struct ovl_fs *ofs = dentry->d_sb->s_fs_info; > > if (ofs->noxattr) > return xerr; > > - err = ovl_do_setxattr(upperdentry, name, value, size, 0); > - > - if (err == -EOPNOTSUPP) { > - pr_warn("overlayfs: cannot set %s xattr on upper\n", name); > - ofs->noxattr = true; > - return xerr; > - } > - > - return err; > + return ovl_do_setxattr(upperdentry, name, value, size, 0); > } > > int ovl_set_impure(struct dentry *dentry, struct dentry *upperdentry) > -- > 2.13.5 > -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html