aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/dir.c13
-rw-r--r--fs/ceph/file.c1
2 files changed, 9 insertions, 5 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 6da4df84ba30..2e3b30dcfc94 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -695,9 +695,8 @@ static int ceph_mknod(struct inode *dir, struct dentry *dentry,
695 ceph_mdsc_put_request(req); 695 ceph_mdsc_put_request(req);
696 696
697 if (!err) 697 if (!err)
698 err = ceph_init_acl(dentry, dentry->d_inode, dir); 698 ceph_init_acl(dentry, dentry->d_inode, dir);
699 699 else
700 if (err)
701 d_drop(dentry); 700 d_drop(dentry);
702 return err; 701 return err;
703} 702}
@@ -735,7 +734,9 @@ static int ceph_symlink(struct inode *dir, struct dentry *dentry,
735 if (!err && !req->r_reply_info.head->is_dentry) 734 if (!err && !req->r_reply_info.head->is_dentry)
736 err = ceph_handle_notrace_create(dir, dentry); 735 err = ceph_handle_notrace_create(dir, dentry);
737 ceph_mdsc_put_request(req); 736 ceph_mdsc_put_request(req);
738 if (err) 737 if (!err)
738 ceph_init_acl(dentry, dentry->d_inode, dir);
739 else
739 d_drop(dentry); 740 d_drop(dentry);
740 return err; 741 return err;
741} 742}
@@ -776,7 +777,9 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
776 err = ceph_handle_notrace_create(dir, dentry); 777 err = ceph_handle_notrace_create(dir, dentry);
777 ceph_mdsc_put_request(req); 778 ceph_mdsc_put_request(req);
778out: 779out:
779 if (err < 0) 780 if (!err)
781 ceph_init_acl(dentry, dentry->d_inode, dir);
782 else
780 d_drop(dentry); 783 d_drop(dentry);
781 return err; 784 return err;
782} 785}
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index dfd2ce3419f8..09c7afe32e49 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -286,6 +286,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
286 } else { 286 } else {
287 dout("atomic_open finish_open on dn %p\n", dn); 287 dout("atomic_open finish_open on dn %p\n", dn);
288 if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) { 288 if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) {
289 ceph_init_acl(dentry, dentry->d_inode, dir);
289 *opened |= FILE_CREATED; 290 *opened |= FILE_CREATED;
290 } 291 }
291 err = finish_open(file, dentry, ceph_open, opened); 292 err = finish_open(file, dentry, ceph_open, opened);