os/: modify getattrs to clear attrs out param before populating
Passing in a non-empty map would otherwise exhibit quite unexpected
behavior. For the bufferptr overload, any preexisting entries would
not be overwritten due to how std::map::emplace behaves. For the
bufferlist overload, it would result in appending to any pre-existing
entries.
The prior commit cleans up one such inadvertent caller which resulted
in the below bug.
Fixes: https://tracker.ceph.com/issues/65185
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit
915f92ba9dc8e192bdcebcb92e7d06a93a401f5d)