ceph: return ceph_mdsc_do_request() errors from __get_parent()
[linux-2.6-microblaze.git] / fs / ceph / export.c
index b6bfa94..79dc068 100644 (file)
@@ -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);