librbd: avoid decrementing iterator before first element
While trying to merge delayed requests, SimpleSchedulerObjectDispatch
can end up iterating before the first element.
With llvm, this leads to a crash:
https://paste.opendev.org/raw/bxnQqqDtIrkOfVvRfkZ6/
This change adds a check, ensuring that we won't decrement the iterator
before the first map element.
Fixes: https://tracker.ceph.com/issues/61503
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit
ca65e85575f7b35ce679309e92e0c9bee8d6b96a)