HDFS-7078. Fix listEZs to work correctly with snapshots. (wang)

(cherry picked from commit 0ecefe60179968984b1892a14411566b7a0c8df3)