- int lock_may_write(struct inode * inode, loff_t start, unsigned long len);
- the inode that is being written
- the first byte to write
- the number of bytes to write
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.