kernel - Fix namecache leak / broken hysteresis
* We were double-using NCF_DESTROYED for both dummy ncp's for
list iteration and to indicate a removed ncp. This prevented
the hysteresis code from properly cleaning up such ncp's.
Symptoms were growing stalls every few seconds on one cpu as
the hysteresis code would try to futiley clean up excess
namecache entries.
* Use NCF_DUMMY instead of NCF_DESTROYED to check for dummy
list iterators in the hysteresis code, allowing it to process
NCF_DESTROYED ncps.
* These ncps could accumulate only in situations where the vnode
nlinks count is greater than 1, since a file deletion when nlinks
is 1 will delete the vnode and all related ncp's.
When nlinks is greater than 1, a file entry deletion does not
necessarily cause the vnode to be deleted, leaving the namecache
records intact, but flagged NCF_DESTROYED, and prevented the
hystersis code from operating correctly.
Reported-by: ftigeot