]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix extra open ref decrease 37249/head
authorXiubo Li <xiubli@redhat.com>
Wed, 22 Jul 2020 01:45:23 +0000 (09:45 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Fri, 18 Sep 2020 15:41:33 +0000 (15:41 +0000)
There is only one place increasing the open ref, but possibly decreased
twice.

Fixes: https://tracker.ceph.com/issues/46664
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit a7e3f54f7668dcc24905651c9151fc5e27766d49)

src/client/Client.cc

index 52e818482a04ac6cf1b26c0d005b7555d2c9df09..edc38c24c531ef90fbb648695363cc992ee4687e 100755 (executable)
@@ -8922,7 +8922,6 @@ int Client::_open(Inode *in, int flags, mode_t mode, Fh **fhp,
        ldout(cct, 8) << "Unable to get caps after open of inode " << *in <<
                          " . Denying open: " <<
                          cpp_strerror(result) << dendl;
-       in->put_open_ref(cmode);
       } else {
        put_cap_ref(in, need);
       }