]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix inode ll_ref reference count leak 37839/head
authorsepia-liu <liuwei_coder@163.com>
Tue, 20 Oct 2020 09:24:57 +0000 (09:24 +0000)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Oct 2020 08:29:42 +0000 (09:29 +0100)
Fixes: https://tracker.ceph.com/issues/47918
Signed-off-by: sepia-liu <liuwei_coder@163.com>
(cherry picked from commit 019ba52c8f3ba8263b67b4d1a3bfd6d20e98eeda)

src/client/Client.cc

index 57295f19aba4c1fd5eb871a54fdf89cb44a8a535..4e11ae0524618c12904c09f80b6d2deff8c20cbf 100755 (executable)
@@ -6423,9 +6423,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;