Skip to content

Commit

Permalink
client: don't need inode when request CEPH_MDS_OP_LOOKUPPARENT
Browse files Browse the repository at this point in the history
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
  • Loading branch information
renhwztetecs committed Dec 14, 2016
1 parent 7c6ad6b commit 957b8d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/client/Client.cc
Expand Up @@ -7964,7 +7964,7 @@ int Client::lookup_parent(Inode *ino, const UserPerm& perms, Inode **parent)
return 0;
}

if (ino->is_root) {
if (ino->is_root()) {
*parent = NULL;
ldout(cct, 3) << "ino is root, no parent" << dendl;
return 0;
Expand All @@ -7973,7 +7973,6 @@ int Client::lookup_parent(Inode *ino, const UserPerm& perms, Inode **parent)
MetaRequest *req = new MetaRequest(CEPH_MDS_OP_LOOKUPPARENT);
filepath path(ino->ino);
req->set_filepath(path);
req->set_inode(ino);

InodeRef target;
int r = make_request(req, perms, &target, NULL, rand() % mdsmap->get_num_in_mds());
Expand Down

0 comments on commit 957b8d4

Please sign in to comment.