summaryrefslogtreecommitdiff
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-12-14 17:26:14 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2020-12-14 17:26:14 +0300
commit6939f977c54a39207e94e429ee4eb14d4923736f (patch)
treeb36af4357d00bd11ef6f70c03ed89a922578edbd /fs/overlayfs
parent2d2f2d7322ff43e0fe92bf8cccdc0b09449bf2e1 (diff)
downloadlinux-6939f977c54a39207e94e429ee4eb14d4923736f.tar.xz
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 <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/copy_up.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index 0b7e7a90a435..e5b616c93e11 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 */