[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, 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 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]