pack_refs(): change to use do_for_each_entry()