From: Miklos Szeredi Date: Mon, 14 Dec 2020 14:26:14 +0000 (+0100) Subject: ovl: do not fail when setting origin xattr X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6939f977c54a39207e94e429ee4eb14d4923736f;p=linux.git ovl: do not fail when setting origin xattr Comment above call already says this, but only EOPNOTSUPP is ignored, other failures are not. For example setting "user.*" will fail with EPERM on symlink/special. Ignore this error as well. Signed-off-by: Miklos Szeredi --- diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index 0b7e7a90a4359..e5b616c93e11b 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -354,7 +354,8 @@ int ovl_set_origin(struct ovl_fs *ofs, struct dentry *dentry, fh ? fh->fb.len : 0, 0); kfree(fh); - return err; + /* Ignore -EPERM from setting "user.*" on symlink/special */ + return err == -EPERM ? 0 : err; } /* Store file handle of @upper dir in @index dir entry */