mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
ceph: Fix ERR_PTR(0) in ceph_mkdir()
When mkdir succeeds, ceph_mkdir() sets ret to ERR_PTR(0) which is
incorrect. It should return NULL instead for success.
Fixes: 88d5baf690 ("Change inode_operations.mkdir to return struct dentry *")
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
8d3ae59288
commit
4f49c3f8a5
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user