Provided by: kernel-doc-2.4.27_2.4.27-12_all
int posix_lock_file (struct file *filp, struct file_lock *caller,
unsigned int wait);
filp The file to apply the lock to
caller The lock to be applied
wait 1 to retry automatically, 0 to return -EAGAIN
Add a POSIX style lock to a file. We merge adjacent locks whenever
possible. POSIX locks are sorted by owner task, then by starting
KAI PETZKE WRITES
To make freeing a lock much faster, we keep a pointer to the lock
before the actual one. But the real gain of the new coding was, that
lock_it and unlock_it became one function.
TO ALL PURISTS
Yes, I use a few goto’s. Just pass on to the next function.