diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-05-16 17:12:41 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-05-19 03:33:49 -0400 |
commit | 21a228781104ae6fed7e720137ab024575071feb (patch) | |
tree | e75c1046173e195f9dfacfa28c88e12ae42b2bbc /fs/overlayfs/util.c | |
parent | 6266d465bde044a105f6c2d4e244680f951a2d70 (diff) |
ovl: handle rename when upper doesn't support xattr
On failure to set opaque/redirect xattr on rename, skip setting xattr and
return -EXDEV.
On failure to set opaque xattr when creating a new directory, -EIO is
returned instead of -EOPNOTSUPP.
Any failure to set those xattr will be recorded in super block and
then setting any xattr on upper won't be attempted again.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r-- | fs/overlayfs/util.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index b5a0dc36ee96..4d541a8d0834 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c | |||
@@ -191,14 +191,7 @@ bool ovl_redirect_dir(struct super_block *sb) | |||
191 | { | 191 | { |
192 | struct ovl_fs *ofs = sb->s_fs_info; | 192 | struct ovl_fs *ofs = sb->s_fs_info; |
193 | 193 | ||
194 | return ofs->config.redirect_dir; | 194 | return ofs->config.redirect_dir && !ofs->noxattr; |
195 | } | ||
196 | |||
197 | void ovl_clear_redirect_dir(struct super_block *sb) | ||
198 | { | ||
199 | struct ovl_fs *ofs = sb->s_fs_info; | ||
200 | |||
201 | ofs->config.redirect_dir = false; | ||
202 | } | 195 | } |
203 | 196 | ||
204 | const char *ovl_dentry_get_redirect(struct dentry *dentry) | 197 | const char *ovl_dentry_get_redirect(struct dentry *dentry) |