Skip to content

Commit c6d5029

Browse files
Qiujun Huangidryomov
authored andcommitted
ceph: return ceph_mdsc_do_request() errors from __get_parent()
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 <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent bf73c62 commit c6d5029

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/ceph/export.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ static struct dentry *__get_parent(struct super_block *sb,
315315

316316
req->r_num_caps = 1;
317317
err = ceph_mdsc_do_request(mdsc, NULL, req);
318+
if (err) {
319+
ceph_mdsc_put_request(req);
320+
return ERR_PTR(err);
321+
}
322+
318323
inode = req->r_target_inode;
319324
if (inode)
320325
ihold(inode);

0 commit comments

Comments
 (0)