[PATCH 6.15 435/515] cifs: Fix collect_sample() to handle any iterator type