Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281985
b: refs/heads/master
c: 3c5184e
h: refs/heads/master
i:
  281983: 1d8411c
v: v3
  • Loading branch information
Al Viro committed Jan 9, 2012
1 parent 4e2e6e0 commit 65e64c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94bf608a18fa4421315275a81c5489734599297a
refs/heads/master: 3c5184ef1216dd476c9c67f22a199d90ac4d5892
15 changes: 11 additions & 4 deletions trunk/fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,19 +636,26 @@ static struct dentry *open_root_dentry(struct ceph_fs_client *fsc,
req->r_num_caps = 2;
err = ceph_mdsc_do_request(mdsc, NULL, req);
if (err == 0) {
struct inode *inode = req->r_target_inode;
req->r_target_inode = NULL;
dout("open_root_inode success\n");
if (ceph_ino(req->r_target_inode) == CEPH_INO_ROOT &&
if (ceph_ino(inode) == CEPH_INO_ROOT &&
fsc->sb->s_root == NULL) {
root = d_alloc_root(req->r_target_inode);
root = d_alloc_root(inode);
if (!root) {
iput(inode);
root = ERR_PTR(-ENOMEM);
goto out;
}
ceph_init_dentry(root);
} else {
root = d_obtain_alias(req->r_target_inode);
root = d_obtain_alias(inode);
}
req->r_target_inode = NULL;
dout("open_root_inode success, root dentry is %p\n", root);
} else {
root = ERR_PTR(err);
}
out:
ceph_mdsc_put_request(req);
return root;
}
Expand Down

0 comments on commit 65e64c8

Please sign in to comment.