---
title: vfs_rootvnode
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.5+]
path: kernel/1562439-vfs_rootvnode
---

# vfs_rootvnode

Returns the root vnode with an iocount.

## Declaration

```occ
vnode_t vfs_rootvnode(void);
```

## Return Value

Return Value Pointer to root vnode if successful; error code if there is a problem taking an iocount.

## Discussion

Discussion Caller must vnode_put() the root node when done.
