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

ceph: add missing init_acl() for mkdir() and atomic_open()

Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
上级 7a92d647
......@@ -695,9 +695,8 @@ static int ceph_mknod(struct inode *dir, struct dentry *dentry,
ceph_mdsc_put_request(req);
if (!err)
err = ceph_init_acl(dentry, dentry->d_inode, dir);
if (err)
ceph_init_acl(dentry, dentry->d_inode, dir);
else
d_drop(dentry);
return err;
}
......@@ -735,7 +734,9 @@ static int ceph_symlink(struct inode *dir, struct dentry *dentry,
if (!err && !req->r_reply_info.head->is_dentry)
err = ceph_handle_notrace_create(dir, dentry);
ceph_mdsc_put_request(req);
if (err)
if (!err)
ceph_init_acl(dentry, dentry->d_inode, dir);
else
d_drop(dentry);
return err;
}
......@@ -776,7 +777,9 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
err = ceph_handle_notrace_create(dir, dentry);
ceph_mdsc_put_request(req);
out:
if (err < 0)
if (!err)
ceph_init_acl(dentry, dentry->d_inode, dir);
else
d_drop(dentry);
return err;
}
......
......@@ -286,6 +286,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
} else {
dout("atomic_open finish_open on dn %p\n", dn);
if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) {
ceph_init_acl(dentry, dentry->d_inode, dir);
*opened |= FILE_CREATED;
}
err = finish_open(file, dentry, ceph_open, opened);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册