lock_may_write — checks that the region is free of locks
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.