vfs_hold or vfs_unhold Kernel Service

Purpose

Holds or releases a vfs structure.

Syntax

#include <sys/vfs.h>
void vfs_hold(vfsp)
struct vfs *vfsp;
int vfs_unhold(vfsp)
struct vfs *vfsp;

Parameter

Item Description
vfsp Points to a vfs structure.

Description

The vfs_hold kernel service holds a vfs structure and the vfs_unhold kernel service releases it. These routines manage a use count for a virtual file system (VFS). A use count greater than 1 prevents the virtual file system from being unmounted.

Execution Environment

These kernel services can be called from the process environment only.

Return Values

The vfs_hold kernel service has no return value.

The vfs_unhold kernel service returns the original value of the hold count.