dentry.c: Read/write dentries from structure