At least UFS and EXT2 use "empty" directory entries, i.e. dirent with zero d_fileno, as a placeholder for removed entries.
Such entries are skipped by libc and elsewhere in the kernel.
Fix: Patch attached with submission follows:
Over to maintainer(s).
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped