提交 cb348edb 编写于 作者: M Miklos Szeredi

ovl: explain error values when removing acl from workdir

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> 
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 6a45b362
...@@ -832,6 +832,19 @@ static struct dentry *ovl_workdir_create(struct vfsmount *mnt, ...@@ -832,6 +832,19 @@ static struct dentry *ovl_workdir_create(struct vfsmount *mnt,
if (err) if (err)
goto out_dput; goto out_dput;
/*
* Try to remove POSIX ACL xattrs from workdir. We are good if:
*
* a) success (there was a POSIX ACL xattr and was removed)
* b) -ENODATA (there was no POSIX ACL xattr)
* c) -EOPNOTSUPP (POSIX ACL xattrs are not supported)
*
* There are various other error values that could effectively
* mean that the xattr doesn't exist (e.g. -ERANGE is returned
* if the xattr name is too long), but the set of filesystems
* allowed as upper are limited to "normal" ones, where checking
* for the above two errors is sufficient.
*/
err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT); err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT);
if (err && err != -ENODATA && err != -EOPNOTSUPP) if (err && err != -ENODATA && err != -EOPNOTSUPP)
goto out_dput; goto out_dput;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册