提交 61ad36d4 编写于 作者: C Chengguang Xu 提交者: Ilya Dryomov

ceph: return errors from posix_acl_equiv_mode() correctly

In order to return correct error code should replace variable ret
using err in error case.
Signed-off-by: NChengguang Xu <cgxu519@gmx.com>
Reviewed-by: N"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 dfeb84d4
......@@ -185,10 +185,10 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode,
return err;
if (acl) {
int ret = posix_acl_equiv_mode(acl, mode);
if (ret < 0)
err = posix_acl_equiv_mode(acl, mode);
if (err < 0)
goto out_err;
if (ret == 0) {
if (err == 0) {
posix_acl_release(acl);
acl = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册