MirOS Manual: vget(9)

VGET(9)                       BSD Kernel Manual                        VGET(9)


     vget - get a vnode from the free list


     #include <sys/param.h>
     #include <sys/vnode.h>

     vget(struct vnode *vp, int flags, struct proc *p);


     Get a vnode from the free list and increment its reference count.

     Its arguments are:

     vp     The vnode to remove from the free list.

     flags  If non-zero, the vnode will also be locked.

     p      The process responsible for this call.

     When not in use, vnodes are kept on a free list. The vnodes still refer-
     ence valid files but may be reused to refer to a new file at any time.
     Often, these vnodes are also held in caches in the system, such as the
     name cache.

     When a vnode which is on the free list is used again, for instance if the
     vnode was found in the name cache as a result of a call to VOP_LOOKUP(9),
     then the new user must call vget() to increment the reference count and
     remove it from the free list.


     [ENOENT]      The vnode vp is in the process of being cleaned out from
                   the underlying file system.


     vnode(9), vput(9), vref(9), vrele(9)


     This man page was originally written by Doug Rabson for FreeBSD.

MirOS BSD #10-current           July 24, 1996                                1

Generated on 2017-04-03 16:26:17 by $MirOS: src/scripts/roff2htm,v 1.88 2017/01/29 00:51:06 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002–2017 The MirOS Project, Germany.
This product includes material provided by mirabilos.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.