vfs: add dentry_ref, a smart pointer for dentrys

Makes managing references easier.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
vfs: convert file::f_dentry to dentry_ref

Fixes possible leak in sys_open() and vfs_file::close() error cases.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
vfs: make error class build in C code

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
vfs: add C++ namei()

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
vfs: covert sys_stat, sys_statfs to C++ namei

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Merge branch 'dref'

"Add dentry_ref, a cousin to fileref, an automatic reference counted smart
pointer for dentries, and start using it."

Reviewed-by: Pekka Enberg <penberg@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>