]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/PrioritizedQueue: fix remove_by_class() corner case
authorSage Weil <sage@inktank.com>
Sat, 15 Mar 2014 03:26:04 +0000 (20:26 -0700)
committerSage Weil <sage@inktank.com>
Tue, 18 Mar 2014 20:16:05 +0000 (13:16 -0700)
commit8bd89442aeb6f9fa7c2dea80b793aae4d70d50c9
treed94eccefdb6babae6c6d4ba192f5edf7c57236c7
parentf8632699b1c4d48a8c495532462204291cab6737
common/PrioritizedQueue: fix remove_by_class() corner case

If i is the first entry, then setting cur = begin() sets us up to point at
something that we are about to delete.  Move the check to the end to avoid
this.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
src/common/PrioritizedQueue.h