]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/cephfs: increment ref before calling out to c++
authorPatrick Donnelly <pdonnell@ibm.com>
Wed, 5 Mar 2025 16:15:20 +0000 (11:15 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Wed, 5 Mar 2025 16:38:35 +0000 (11:38 -0500)
commit395263ceb2f351d540359f52694b48b2824e1291
tree6c0ba02b1d1c2cc90442d9b84511d13845026c5c
parent302756c58948d6da44c9dc7eebbe4b1691f4413d
pybind/cephfs: increment ref before calling out to c++

At the time this construction seemed safe since the caller should have a
reference but it could conveivably be the only ref. We don't want the ref count
to reach 0.

Additionally, catch errors so this callback is genuinely noexcept.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/pybind/cephfs/cephfs.pyx