[ Previous | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vn_unmap Entry Point

Purpose

Unmaps a file.

Syntax

int vn_unmap (vp, flag, crp)
struct vnode *vp;
ulong flag;
struct ucred *crp;

Parameters

vp Points to the v-node (virtual node) of the file.
flag Indicates how the file was mapped. This flag takes the following values:
SHM_RDONLY The virtual memory object is read-only.
SHM_COPY The virtual memory object is copy-on-write.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vn_unmap entry point is called by the logical file system to unmap a file. When this entry point routine completes successfully, the use count for the memory object should be decremented and (if the use count went to 0) the memory object should be destroyed. The file system implementation is required to perform only those operations that are unique to the file system. The logical file system handles virtual-memory management operations.

Execution Environment

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

Return Values

0 Indicates success.

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

Related Information

Virtual File System Overview, Virtual File System Kernel Extensions Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes) in AIX Kernel Extensions and Device Support Programming Concepts.

List of Virtual File System Operations.


[ Previous | Contents | Home | Search ]