summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index ef9e92e362d3..b4b541a1180c 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -1174,7 +1174,7 @@ static struct dentry *ceph_mkdir(struct mnt_idmap *idmap, struct inode *dir,
!req->r_reply_info.head->is_target &&
!req->r_reply_info.head->is_dentry)
err = ceph_handle_notrace_create(dir, dentry);
- ret = ERR_PTR(err);
+ ret = err ? ERR_PTR(err) : NULL;
out_req:
if (!IS_ERR(ret) && req->r_dentry != dentry)
/* Some other dentry was spliced in */