提交 b7b0553f 编写于 作者: K Konstantin Komarov 提交者: Zheng Zengkai

fs/ntfs3: Change posix_acl_equiv_mode to posix_acl_update_mode

mainline inclusion
from mainline-v5.15
commit ba77237e
category: feature
bugzilla:
https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue
CVE: NA

----------------------------------------------------------------------

Right now ntfs3 uses posix_acl_equiv_mode instead of
posix_acl_update_mode like all other fs.
Reviewed-by: NKari Argillander <kari.argillander@gmail.com>
Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: NYin Xiujiang <yinxiujiang@kylinos.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NHou Tao <houtao1@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 ef89249c
...@@ -559,22 +559,15 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns, ...@@ -559,22 +559,15 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns,
if (acl) { if (acl) {
umode_t mode = inode->i_mode; umode_t mode = inode->i_mode;
err = posix_acl_equiv_mode(acl, &mode); err = posix_acl_update_mode(mnt_userns, inode, &mode,
if (err < 0) &acl);
return err; if (err)
goto out;
if (inode->i_mode != mode) { if (inode->i_mode != mode) {
inode->i_mode = mode; inode->i_mode = mode;
mark_inode_dirty(inode); mark_inode_dirty(inode);
} }
if (!err) {
/*
* ACL can be exactly represented in the
* traditional file mode permission bits.
*/
acl = NULL;
}
} }
name = XATTR_NAME_POSIX_ACL_ACCESS; name = XATTR_NAME_POSIX_ACL_ACCESS;
name_len = sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1; name_len = sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册