1. vfs_lock_file – file byte range lock
2. Manual
int vfs_lock_file(struct file * filp, unsigned int cmd, struct file_lock * fl, struct file_lock * conf);
filp
The file to apply the lock to
cmd
type of locking operation (F_SETLK, F_GETLK, etc.)
fl
The lock to be applied
conf
Place to return a copy of the conflicting lock, if found.