On Thu, 8 Sep 2011 02:42:34 +0400 Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote: > > > +err: > > > + up_read(&mm->mmap_sem); > > > + > > > + for (i = 0; i < used && !ret; i++) { > > > > The "&& !ret" is unneeded? > > No, it's needed, since it makes sure that if "impossible" > scenario happens and flex-arrays fails with preallocated > data so we will reach this point with used > 0 and ret = -ENOMEM > and thus will not call for proc_map_files_instantiate as needed. Well, it doesn't need to be tested on each pass around the loop - that's misleading and inefficient (unless the compiler is being particularly clever). -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html