mirror of
https://github.com/torvalds/linux.git
synced 2024-10-31 01:01:52 +00:00
ceph: add missing init_acl() for mkdir() and atomic_open()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This commit is contained in:
parent
7a92d64760
commit
b20a95a0dd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user