Skip to content

Commit

Permalink
Merge pull request #10429 from jcsp/wip-16807-assertion
Browse files Browse the repository at this point in the history
mds: add assertion in handle_slave_rename_prep

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
  • Loading branch information
John Spray committed Jul 28, 2016
2 parents ec6dab7 + 7fe9c15 commit 2b119e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mds/Server.cc
Expand Up @@ -7155,10 +7155,13 @@ void Server::handle_slave_rename_prep(MDRequestRef& mdr)
// discover srcdn
filepath srcpath(mdr->slave_request->srcdnpath);
dout(10) << " src " << srcpath << dendl;
CInode *srci;
CInode *srci = nullptr;
r = mdcache->path_traverse(mdr, NULL, NULL, srcpath, &trace, &srci, MDS_TRAVERSE_DISCOVERXLOCK);
if (r > 0) return;
assert(r == 0);

// srcpath must not point to a null dentry
assert(srci != nullptr);

CDentry *srcdn = trace[trace.size()-1];
CDentry::linkage_t *srcdnl = srcdn->get_projected_linkage();
Expand Down

0 comments on commit 2b119e8

Please sign in to comment.