infinite loop in jffs2_flush_wbuf_gc()?

David Woodhouse dwmw2 at infradead.org
Mon Jul 11 10:55:52 EDT 2005


On Fri, 2005-07-08 at 09:26 -0700, Rick Bronson wrote:
>   I seem to encounter an infinite loop in in jffs2_flush_wbuf_gc() in
> wbuf.c starting at: 
> 
>         } else while (old_wbuf_len &&
>                       old_wbuf_ofs == c->wbuf_ofs) {
> 
>   Once it gets in this loop, I don't see how it ever gets out if
> c->wbuf_ofs doesn't change.

If we call the garbage collector and it doesn't make progress, then it
will return an error. In the error case we break out of the loop.

If the garbage collector _does_ make progress, then (as soon as it's
finished CRC-checking inodes) c->wbuf_ofs will be changing.

-- 
dwmw2





More information about the linux-mtd mailing list