yang chen wrote: > McKay,All > > Any new update on this issue? Thanks. I just came across similar issue > in which readdir(..) can't return NULL...causing endless loop... > I just stopped the directory from rewinding if it was read or written. It would cause a loop where it would continuously rewind if there were more entries than could be buffered in a single read. Here's a patch. Not sure if it'll apply directly to your source, but should give you the idea of how I fixed it. --- yaffs_fs.c 21 Dec 2007 00:24:37 -0000 1.1.8.1 +++ yaffs_fs.c 5 Sep 2008 19:36:29 -0000 1.1.8.1.24.1 @@ -960,7 +960,7 @@ readdir, rewind to after the 2 canned entries. */ if (f->f_version != inode->i_version) { - offset = 2; + //offset = 2; //ARG!!! This is causing readdir to infinitely repeat directory listings. Don't Rewind! f->f_pos = offset; f->f_version = inode->i_version; } Andrew McKay Iders Inc.