提交 7a92d647 编写于 作者: Y Yan, Zheng 提交者: Sage Weil

ceph: fix ceph_set_acl()

If acl is equivalent to file mode permission bits, ceph_set_acl()
needs to remove any existing acl xattr. Use __ceph_setxattr() to
handle both setting and removing acl xattr cases, it doesn't return
-ENODATA when there is no acl xattr.
Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
上级 524186ac
......@@ -160,11 +160,7 @@ int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type)
goto out_dput;
}
if (value)
ret = __ceph_setxattr(dentry, name, value, size, 0);
else
ret = __ceph_removexattr(dentry, name);
ret = __ceph_setxattr(dentry, name, value, size, 0);
if (ret) {
if (new_mode != old_mode) {
newattrs.ia_mode = old_mode;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册