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

vn_close Entry Point

Purpose

Closes a file associated with a v-node (virtual node).

Syntax

int vn_close (vp, flag, vinfo, crp)
struct vnode *vp;
int flag;
caddr_t vinfo;
struct ucred *crp;

Parameters

vp Points to the v-node.
flag Identifies the flag word from the file pointer.
vinfo This parameter is not used.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vn_close entry point is used by the logical file system to announce that the file associated with a given v-node is now closed. The v-node continues to remain active but will no longer receive read or write requests through the vn_rdwr entry point.

A vn_close entry point is called only when the use count of an associated file structure entry goes to 0 (zero).

Note: The v-node is held over the duration of the vn_close entry point.

Execution Environment

The vn_close 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.

Note: The vn_close entry point may fail and an error will be returned to the application. However, the v-node is considered closed.

Related Information

The close subroutine.

The vn_open entry point, vn_rele entry point.

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.


[ Previous | Next | Contents | Home | Search ]