mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ceph: return ceph_mdsc_do_request() errors from __get_parent()
[ Upstream commit c6d5029603 ]
Return the error returned by ceph_mdsc_do_request(). Otherwise,
r_target_inode ends up being NULL this ends up returning ENOENT
regardless of the error.
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f5fce9166d
commit
debfa1e28e
@@ -157,6 +157,11 @@ static struct dentry *__get_parent(struct super_block *sb,
|
||||
|
||||
req->r_num_caps = 1;
|
||||
err = ceph_mdsc_do_request(mdsc, NULL, req);
|
||||
if (err) {
|
||||
ceph_mdsc_put_request(req);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
inode = req->r_target_inode;
|
||||
if (inode)
|
||||
ihold(inode);
|
||||
|
||||
Reference in New Issue
Block a user