Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man9/VOP_LOOKUP.9
Show All 22 Lines | |||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd March 27, 2017 | .Dd November 17, 2017 | ||||
.Dt VOP_LOOKUP 9 | .Dt VOP_LOOKUP 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm VOP_LOOKUP | .Nm VOP_LOOKUP | ||||
.Nd lookup a component of a pathname | .Nd lookup a component of a pathname | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/param.h | .In sys/param.h | ||||
.In sys/vnode.h | .In sys/vnode.h | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
.Bd -ragged -offset indent | .Bd -ragged -offset indent | ||||
If at end of path and deleting, return information to allow delete. | If at end of path and deleting, return information to allow delete. | ||||
If at end of path and renaming, lock target | If at end of path and renaming, lock target | ||||
inode and return info to allow rename. | inode and return info to allow rename. | ||||
If not at end, add name to cache; if at end and neither creating | If not at end, add name to cache; if at end and neither creating | ||||
nor deleting, add name to cache. | nor deleting, add name to cache. | ||||
.Ed | .Ed | ||||
.Sh LOCKS | .Sh LOCKS | ||||
The directory, | The directory | ||||
.Fa dvp | .Fa dvp | ||||
should be locked on entry. | should be locked on entry and exit, regardless of error condition. | ||||
If an error (note: the return value | |||||
.Er EJUSTRETURN | |||||
is not considered an error) | |||||
is detected, it will be returned locked. | |||||
Otherwise, it will be unlocked unless both | |||||
.Dv LOCKPARENT | |||||
and | |||||
.Dv ISLASTCN | |||||
are specified in | |||||
.Fa cnp->cn_flags . | |||||
If an entry is found in the directory, it will be returned locked. | If an entry is found in the directory, it will be returned locked. | ||||
.Sh RETURN VALUES | .Sh RETURN VALUES | ||||
Zero is returned with | Zero is returned with | ||||
.Fa *vpp | .Fa *vpp | ||||
set to the locked vnode of the file if the component is found. | set to the locked vnode of the file if the component is found. | ||||
If the component being searched for is ".", then the vnode just has | If the component being searched for is ".", then the vnode just has | ||||
an extra reference added to it with | an extra reference added to it with | ||||
.Xr vref 9 . | .Xr vref 9 . | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |