vfs_umount Entry Point

Purpose

Unmounts a virtual file system.

Syntax

int vfs_umount ( vfsp,  crp)
struct vfs *vfsp;
struct ucred *crp;

Parameters

Item Description
vfsp Points to the vfs structure being unmounted. This structure is defined in the /usr/include/sys/vfs.h file.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vfs_umount entry point is called to unmount a virtual file system. The logical file system performs services independent of the virtual file system that initiate the unmounting. The logical file system services:

The logical file system assumes that, if necessary, successful vfs_umount entry point calls free the root v-node. An error return from the vfs_umount entry point causes the mount point to be re-established. A 0 (zero) returned from the vfs_umount entry point indicates the routine was successful and that the vfs structure was released.

Execution Environment

The vfs_umount entry point can be called from the process environment only.

Return Values

Item Description
0 Indicates success.

Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.