--- "Raghu R. Arur" <rra2002@aria.ncl.cs.columbia.edu> wrote: > > hi, > > I am having some problems with traversing the > mmlist... i am not > catching all the mm_structs in the list... the loop i > have used is > > struct mm_struct *mm; > struct list_head *p = &init_mm.mmlist; > spin_lock(&mmlist_lock); > p = p->next; > mm = list_entry(p, struct mm_struct, mmlist); > > while(mm != &init_mm) { > /* do what i need to do on the mm_struct */ > p = p->next; > mm = list_entry(p, struct mm_struct, mmlist); > } > spin_unlock(&mmlist_lock); Why don't you use the list_for_each() macro? Of course, I don't see anything obviously wrong with your code either. How did you find out you missed some mm structs? Ravi. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/