kernel - Fix mount bug caught by assertion

* A recently added assertion caught a bug in the mount code where
  a namecache entry was not being properly locked.

* Fix the bug in checkdirs() (called by the mount code).
Merge branch 'master' into gsocdrm_jfree