This patch effects all users of libfs' dcache directory implementation. Old glibc implementations (e.g. glibc-2.2.5) are lseeking after every call to getdents(), subsequent calls to getdents() are starting to read from a wrong f_pos, when the directory is modified in between. Therefore not all directory entries are returned. IMHO this is a bug and it breaks applications, e.g. "rm -fr" on tmpfs. SuSV3 only says: "If a file is removed from or added to the directory after the most recent call to opendir() or rewinddir(), whether a subsequent call to readdir_r() returns an entry for that file is unspecified." Although I tried to provide a small fix, this is a complete rework of the libfs' dcache_readdir() and dcache_dir_lseek(). This patch use the dentries name hashes as the offsets for the directory entries. I'm not that sure it is maybe a problem to use full_name_hash() for that. If hash collisions occur, readdir() might return duplicate entries after an lseek(). Any ideas? This patch is compile and boot tested. This patch is against 2.6.14-git of today. Comments, please. Jan -- Jan Blunck jblunck@suse.de SuSE LINUX AG - A Novell company Maxfeldstr. 5 +49-911-74053-608 D-90409 Nürnberg http://www.suse.de