1809 struct mfc_cache *mfc = v;
1810 struct ipmr_mfc_iter *it = seq->private;
1811
1812 ++*pos;
1813
1814 if (v == SEQ_START_TOKEN)
1815 return ipmr_mfc_seq_idx(seq->private, 0);
1816
1817 if (mfc->next)
1818 return mfc->next;
1819
1820 if (it->cache == &mfc_unres_queue)
1821 goto end_of_list;
1822
1823 BUG_ON(it->cache != mfc_cache_array);
1824
1825 while (++it->ct < MFC_LINES) {
1826 mfc = mfc_cache_array[it->ct];
1827 if (mfc)
1828 return mfc;
1829 }
1830
1831
1832 read_unlock(&mrt_lock);
1833 it->cache = &mfc_unres_queue;
1834 it->ct = 0;
1835
1836 spin_lock_bh(&mfc_unres_lock);
1837 mfc = mfc_unres_queue;
1838 if (mfc)
1839 return mfc;
1840
1841 end_of_list:
1842 spin_unlock_bh(&mfc_unres_lock);
1843 it->cache = NULL;
1844
1845 return NULL;
1846}
1847
1848static void ipmr_mfc_seq_stop(struct seq_file *seq, void *v)
1849{