lock_may_read(9)

lock_may_read9

Checks that the region is free of locks

Usage

int lock_may_read(struct inode * inode, loff_t start, unsigned long len);

Arguments

inode

the inode that is being read

start

the first byte to read

len

the number of bytes to read

Overview

Emulates Windows locking requirements. Whole-file mandatory locks (share modes) can prohibit a read and byte-range POSIX locks can prohibit a read if they overlap.

N.B. this function is only ever called from knfsd and ownership of locks is never checked.

Releases

5 releases since Debian 4.0 (Etch); the text changed 4 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.