Commit f84ff325 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Kamal Mostafa

ovl: fix workdir creation

BugLink: http://bugs.launchpad.net/bugs/1624037

commit e1ff3dd1 upstream.

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: default avatarMartin Ziegler <ziegler@uni-freiburg.de>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Fixes: c11b9fdd ("ovl: remove posix_acl_default from workdir")
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent ad434057
...@@ -868,11 +868,11 @@ static struct dentry *ovl_workdir_create(struct vfsmount *mnt, ...@@ -868,11 +868,11 @@ static struct dentry *ovl_workdir_create(struct vfsmount *mnt,
goto out_dput; goto out_dput;
err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT); err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT);
if (err && err != -ENODATA) if (err && err != -ENODATA && err != -EOPNOTSUPP)
goto out_dput; goto out_dput;
err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_ACCESS); err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_ACCESS);
if (err && err != -ENODATA) if (err && err != -ENODATA && err != -EOPNOTSUPP)
goto out_dput; goto out_dput;
/* Clear any inherited mode bits */ /* Clear any inherited mode bits */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment