]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: avoid null dereference if stats are not available 44700/head
authorJosh Durgin <jdurgin@redhat.com>
Fri, 7 Jan 2022 18:37:13 +0000 (13:37 -0500)
committerCory Snyder <csnyder@iland.com>
Thu, 20 Jan 2022 19:26:37 +0000 (14:26 -0500)
commit8de9938579fc993b4c0e0b0126fe4e1b224ab818
tree7e6155b750c2de49edf2782445db7bb48982acd9
parent653efc847ae4cf34d9f5f57d438a6ef3e4619fe0
mon/OSDMonitor: avoid null dereference if stats are not available

Not confirmed yet whether this was the issue in the bug referenced
below, however it's a necessary defensive check for the
'osd pool get-quota' command.

All other uses of get_pool_stats() already handle this case.

Related-to: https://tracker.ceph.com/issues/53740
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit 9c8392be33a574f15bc35b8f49e319af50d99e90)

Conflicts:
src/mon/OSDMonitor.cc

Cherry-pick notes:
- mon variable was a pointer in Octopus
src/mon/OSDMonitor.cc