VOP_OLD_LINK(9)

NAME
VOP_OLD_LINK - create a new name for a file

SYNOPSIS
#include <sys/param.h>
#include <sys/vnode.h>
int
VOP_OLD_LINK(struct vnode *dvp, struct vnode *vp, struct componentname *cnp);

DESCRIPTION
This links a new name in the specified directory to an existing file.

Its arguments are:

dvp the vnode of the directory

vp  the vnode of the file to be linked

cnp pathname information about the file

The pathname info must be released on exit. The directory and file vnodes should NOT be released on exit.

LOCKS
The directory, dvp is locked on entry and should remain locked on return. The file vp is not locked on entry and should remain that way on return. If your VOP code locks vp, it must be sure to unlock prior to returning.

RETURN VALUES
Zero is returned if the file was linked successfully, otherwise an error is returned.

ERRORS

[EPERM]
    the file is immutable

SEE ALSO
vnode(9), vn_lock(9)

AUTHORS
This man page was originally written by Doug Rabson.