posix_lock_file — Apply a POSIX-style lock to a file
int posix_lock_file (
struct file * filp, struct file_lock * fl)
;
Add a POSIX style lock to a file. We merge adjacent & overlapping locks whenever possible. POSIX locks are sorted by owner task, then by starting address
Note that if called with an FL_EXISTS argument, the caller may determine whether or not a lock was successfully freed by testing the return value for -ENOENT.