.TH "lock_may_write" 9 "lock_may_write" "25 May 1998" "Kernel Hacker's Manual" LINUX .SH NAME lock_may_write \- checks that the region is free of locks .SH SYNOPSIS .B "int" lock_may_write .BI "(struct inode *" inode "," .BI "loff_t " start "," .BI "unsigned long " len ");" .SH ARGUMENTS .IP "inode" 12 the inode that is being written .IP "start" 12 the first byte to write .IP "len" 12 the number of bytes to write .SH "DESCRIPTION" 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. N.B. this function is only ever called from knfsd and ownership of locks is never checked.