]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix extra open ref decrease 36966/head
authorXiubo Li <xiubli@redhat.com>
Wed, 22 Jul 2020 01:45:23 +0000 (09:45 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Thu, 3 Sep 2020 07:38:04 +0000 (07:38 +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 f1facc596f34b2b1e89bcf2892b5eba4918308dc..6b4897ad5e165f17cf265a5c3d57daaadbc48358 100755 (executable)
@@ -8869,7 +8869,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);
       }