aboutsummaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-10-04 08:40:44 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2016-10-14 05:16:46 -0400
commitcb348edb6bef7250d1d0f8f2d7dac152d8b52626 (patch)
tree166b20d741c93b36a960fbf9092920ffcee45273 /fs/overlayfs
parent6a45b3628ce4dcf7498b39c87d475bab6e2a9b24 (diff)
ovl: explain error values when removing acl from workdir
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/super.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 8ccebaf64c5b..eff0f909cd78 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -832,6 +832,19 @@ retry:
832 if (err) 832 if (err)
833 goto out_dput; 833 goto out_dput;
834 834
835 /*
836 * Try to remove POSIX ACL xattrs from workdir. We are good if:
837 *
838 * a) success (there was a POSIX ACL xattr and was removed)
839 * b) -ENODATA (there was no POSIX ACL xattr)
840 * c) -EOPNOTSUPP (POSIX ACL xattrs are not supported)
841 *
842 * There are various other error values that could effectively
843 * mean that the xattr doesn't exist (e.g. -ERANGE is returned
844 * if the xattr name is too long), but the set of filesystems
845 * allowed as upper are limited to "normal" ones, where checking
846 * for the above two errors is sufficient.
847 */
835 err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT); 848 err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT);
836 if (err && err != -ENODATA && err != -EOPNOTSUPP) 849 if (err && err != -ENODATA && err != -EOPNOTSUPP)
837 goto out_dput; 850 goto out_dput;