From: xie xingguo Date: Tue, 19 Jan 2016 10:31:02 +0000 (+0800) Subject: kstore: fix dest onode process logic of clone_range X-Git-Tag: v10.0.4~178^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ab7998fbe19d076c653ca78d328a2794ef29535;p=ceph.git kstore: fix dest onode process logic of clone_range Signed-off-by: xie xingguo --- diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc index 68d6e9298432..2aa62536cfd7 100644 --- a/src/os/kstore/KStore.cc +++ b/src/os/kstore/KStore.cc @@ -3596,7 +3596,11 @@ int KStore::_clone_range(TransContext *txc, r = -ENOENT; goto out; } - newo = c->get_onode(new_oid, true); + newo = c->get_onode(new_oid, false); + if (!newo) { + newo = c->get_onode(new_oid, true); + _assign_nid(txc, newo); + } assert(newo); newo->exists = true;