.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "LOCK_MAY_READ" "" "06 October 2005" "" ""
.SH NAME
lock_may_read \- checks that the region is free of locks
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int lock_may_read (struct inode * \fIinode\fB, loff_t \fIstart\fB, unsigned long \fIlen\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIinode\fB\fR
the inode that is being read
.TP
\fB\fIstart\fB\fR
the first byte to read
.TP
\fB\fIlen\fB\fR
the number of bytes to read
.SH "DESCRIPTION"
.PP
Emulates Windows locking requirements. Whole-file
mandatory locks (share modes) can prohibit a read and
byte-range POSIX locks can prohibit a read if they overlap.
.PP
N.B. this function is only ever called
from knfsd and ownership of locks is never checked.