---
name: "locks_mandatory_area"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/locks_mandatory_area"
---

# locks\_mandatory\_area(9)

Check for a conflicting lock

## 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

*inode*

the file to check

*filp*

how the file was opened (if it was)

*start*

first byte in the file to check

*end*

lastbyte in the file to check

*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.

## COPYRIGHT
