'\" t .\" Title: lock_may_write .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "LOCK_MAY_WRITE" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "The Linux VFS" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" lock_may_write \- checks that the region is free of locks .SH "SYNOPSIS" .HP \w'int\ lock_may_write('u .BI "int lock_may_write(struct\ inode\ *\ " "inode" ", loff_t\ " "start" ", unsigned\ long\ " "len" ");" .SH "ARGUMENTS" .PP \fIinode\fR .RS 4 the inode that is being written .RE .PP \fIstart\fR .RS 4 the first byte to write .RE .PP \fIlen\fR .RS 4 the number of bytes to write .RE .SH "DESCRIPTION" .PP Emulates Windows locking requirements\&. Whole\-file mandatory locks (share modes) can prohibit a write and byte\-range POSIX locks can prohibit a write if they overlap\&. .PP N\&.B\&. this function is only ever called from knfsd and ownership of locks is never checked\&. .SH "COPYRIGHT" .br