diff options
author | Qiujun Huang <hqjagain@gmail.com> | 2020-03-06 09:34:20 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-03-30 12:42:42 +0200 |
commit | c6d50296032f0b97473eb2e274dc7cc5d0173847 (patch) | |
tree | 44f6245d88487b68f2f54f5ccb3d766f8d9473b2 /fs/ceph/export.c | |
parent | bf73c62e7ff8dc220f3f57df4e42f9947320c447 (diff) |
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 <hqjagain@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/export.c')
-rw-r--r-- | fs/ceph/export.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index b6bfa94332c3..79dc06881e78 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c @@ -315,6 +315,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); |