diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-05-17 00:12:41 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-05-19 10:33:49 +0300 |
commit | 21a228781104ae6fed7e720137ab024575071feb (patch) | |
tree | e75c1046173e195f9dfacfa28c88e12ae42b2bbc /fs/overlayfs/util.c | |
parent | 6266d465bde044a105f6c2d4e244680f951a2d70 (diff) | |
download | linux-21a228781104ae6fed7e720137ab024575071feb.tar.xz |
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) { struct ovl_fs *ofs = sb->s_fs_info; - return ofs->config.redirect_dir; -} - -void ovl_clear_redirect_dir(struct super_block *sb) -{ - struct ovl_fs *ofs = sb->s_fs_info; - - ofs->config.redirect_dir = false; + return ofs->config.redirect_dir && !ofs->noxattr; } const char *ovl_dentry_get_redirect(struct dentry *dentry) |