Name

locks_mandatory_area — Check for a conflicting lock

Synopsis

int locks_mandatory_area (struct inode * inode,
 struct file * filp,
 loff_t start,
 loff_t end,
 unsigned char type);
 

Arguments

struct inode * inode

the file to check

struct file * filp

how the file was opened (if it was)

loff_t start

first byte in the file to check

loff_t end

lastbyte in the file to check

unsigned char type

F_WRLCK for a write lock, else F_RDLCK

Description

Searches the inode's list of locks to find any POSIX locks which conflict.