]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix inode ll_ref reference count leak 37735/head
authorsepia-liu <liuwei_coder@163.com>
Tue, 20 Oct 2020 09:24:57 +0000 (09:24 +0000)
committersepia-liu <liuwei_coder@163.com>
Fri, 23 Oct 2020 01:50:35 +0000 (09:50 +0800)
Fixes: https://tracker.ceph.com/issues/47918
Signed-off-by: sepia-liu <liuwei_coder@163.com>
src/client/Client.cc

index 08f67a961a8ecc9e6c45d30ebde6c205456a1400..0c60a4af1276022d61957cb8b190cbfbbf82cb60 100644 (file)
@@ -6606,9 +6606,7 @@ int Client::_lookup(Inode *dir, const string& dname, int mask, InodeRef *target,
       int r = make_request(req, perms, &tmptarget, NULL, rand() % mdsmap->get_num_in_mds());
 
       if (r == 0) {
-       Inode *tempino = tmptarget.get();
-       _ll_get(tempino);
-       *target = tempino;
+       *target = std::move(tmptarget);
        ldout(cct, 8) << __func__ << " found target " << (*target)->ino << dendl;
       } else {
        *target = dir;