| 6521 | } |
| 6522 | |
| 6523 | struct vnode * |
| 6524 | vfs_cache_root_clear(struct mount *mp) |
| 6525 | { |
| 6526 | struct vnode *vp; |
| 6527 | |
| 6528 | /* |
| 6529 | * ops > 0 guarantees there is nobody who can see this vnode |
| 6530 | */ |
| 6531 | MPASS(mp->mnt_vfs_ops > 0); |
| 6532 | vp = mp->mnt_rootvnode; |
| 6533 | if (vp != NULL) |
| 6534 | vn_seqc_write_begin(vp); |
| 6535 | mp->mnt_rootvnode = NULL; |
| 6536 | return (vp); |
| 6537 | } |
| 6538 | |
| 6539 | void |
| 6540 | vfs_cache_root_set(struct mount *mp, struct vnode *vp) |
no test coverage detected