diff options
| -rw-r--r-- | fs/ceph/export.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index f1828af09912..a610d3d67488 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c | |||
| @@ -107,8 +107,10 @@ static struct dentry *__fh_to_dentry(struct super_block *sb, | |||
| 107 | req->r_ino1 = vino; | 107 | req->r_ino1 = vino; |
| 108 | req->r_num_caps = 1; | 108 | req->r_num_caps = 1; |
| 109 | err = ceph_mdsc_do_request(mdsc, NULL, req); | 109 | err = ceph_mdsc_do_request(mdsc, NULL, req); |
| 110 | inode = req->r_target_inode; | ||
| 111 | if (inode) | ||
| 112 | igrab(inode); | ||
| 110 | ceph_mdsc_put_request(req); | 113 | ceph_mdsc_put_request(req); |
| 111 | inode = ceph_find_inode(sb, vino); | ||
| 112 | if (!inode) | 114 | if (!inode) |
| 113 | return ERR_PTR(-ESTALE); | 115 | return ERR_PTR(-ESTALE); |
| 114 | } | 116 | } |
| @@ -163,8 +165,10 @@ static struct dentry *__cfh_to_dentry(struct super_block *sb, | |||
| 163 | snprintf(req->r_path2, 16, "%d", cfh->parent_name_hash); | 165 | snprintf(req->r_path2, 16, "%d", cfh->parent_name_hash); |
| 164 | req->r_num_caps = 1; | 166 | req->r_num_caps = 1; |
| 165 | err = ceph_mdsc_do_request(mdsc, NULL, req); | 167 | err = ceph_mdsc_do_request(mdsc, NULL, req); |
| 168 | inode = req->r_target_inode; | ||
| 169 | if (inode) | ||
| 170 | igrab(inode); | ||
| 166 | ceph_mdsc_put_request(req); | 171 | ceph_mdsc_put_request(req); |
| 167 | inode = ceph_find_inode(sb, vino); | ||
| 168 | if (!inode) | 172 | if (!inode) |
| 169 | return ERR_PTR(err ? err : -ESTALE); | 173 | return ERR_PTR(err ? err : -ESTALE); |
| 170 | } | 174 | } |
