[PATCH 6.16 474/570] cifs: Fix collect_sample() to handle any iterator type