dentry.{c,h}: Cleanup and fixes