Fixes: https://tracker.ceph.com/issues/38006
Signed-off-by: Mykola Golub <mgolub@suse.com>
return r;
}
- std::remove_if(trash_entries.begin(), trash_entries.end(),
- [](librbd::trash_image_info_t info) {
- return info.source != RBD_TRASH_IMAGE_SOURCE_USER;
- }
- );
+ trash_entries.erase(
+ std::remove_if(trash_entries.begin(), trash_entries.end(),
+ [](librbd::trash_image_info_t info) {
+ return info.source != RBD_TRASH_IMAGE_SOURCE_USER;
+ }),
+ trash_entries.end());
std::set<std::string> to_be_removed;
if (threshold != -1) {