Check for an active lock
int locks_mandatory_locked(struct file * file);
file
the file to check
Searches the inode's list of locks to find any POSIX locks which conflict. This function is called from locks_verify_locked only.