]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: fix extra open ref decrease
authorXiubo Li <xiubli@redhat.com>
Wed, 22 Jul 2020 01:45:23 +0000 (09:45 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 22 Jul 2020 02:02:15 +0000 (10:02 +0800)
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>
src/client/Client.cc

index 3bb4749808eee62e3382a01d4f634349fc9bfdb8..f4ddfd416ba89239d864fcb4f38ea5bc79e33e15 100755 (executable)
@@ -8931,7 +8931,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);
       }