rgw/lc: advance head if the current entry doesn't exist
This is extension to https://github.com/ceph/ceph/pull/47595.
When skipping the non-exist LC entry, instead of get_next_entry(),
use advance_head() to fetch the next entry. In case the cycle
is finished for that shard, head should be reset to avoid lc process
being stuck in indefinite loop.
Fixes: https://tracker.ceph.com/issues/65160
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit
86a8709dc8884c5f065946926648a75485002efb)