ovl: fix workdir creation
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 5 Sep 2016 11:55:20 +0000 (13:55 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 5 Sep 2016 11:55:20 +0000 (13:55 +0200)
Workdir creation fails in latest kernel.

Fix by allowing EOPNOTSUPP as a valid return value from
vfs_removexattr(XATTR_NAME_POSIX_ACL_*).  Upper filesystem may not support
ACL and still be perfectly able to support overlayfs.

Reported-by: Martin Ziegler <ziegler@uni-freiburg.de>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: c11b9fdd6a61 ("ovl: remove posix_acl_default from workdir")
Cc: <stable@vger.kernel.org>
fs/overlayfs/super.c

index a4585f961bf919a836c1a7e0133ad6309cfad9db..e2a94a26767ba5df543540c8da39e85977aa371c 100644 (file)
@@ -835,11 +835,11 @@ retry:
                        goto out_dput;
 
                err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT);
-               if (err && err != -ENODATA)
+               if (err && err != -ENODATA && err != -EOPNOTSUPP)
                        goto out_dput;
 
                err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_ACCESS);
-               if (err && err != -ENODATA)
+               if (err && err != -ENODATA && err != -EOPNOTSUPP)
                        goto out_dput;
 
                /* Clear any inherited mode bits */