Skip to contentSkip to conversation

fs/ceph: return errcode in __get_parent().

PATCH In review Qiujun Huang 2 participants 2 messages Mar 6, 2020 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ceph: return errcode in __get_parent().

return real errcode when it's different from ENOENT.

---
 fs/ceph/export.c | 5 +++++
 1 file changed, 5 insertions(+)
fs/ceph/export.c +5 -0
index b6bfa94..79dc068 100644
@@ -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);
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 13 lines · Qiujun Huang

return real errcode when it's different from ENOENT.

---
 fs/ceph/export.c | 5 +++++
 1 file changed, 5 insertions(+)
fs/ceph/export.c +0 -0
index b6bfa94..79dc068 100644
@@ -315,6 +315,11 @@ static struct dentry *__get_parent(struct super_block *sb,
 

fs/ceph/export.c static struct dentry *__get_parent(struct super_block *sb, · line 325

Quoted 10 lines
fs/ceph/export.c +5 -0
 	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);

Looks good! Merged into the ceph-client/testing branch and should make 5.7. Thanks for the patch!

Signature · 1 line
Jeff Layton <[email protected]>