[PATCH 6.12 370/444] cifs: Fix collect_sample() to handle any iterator type