Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\locks.c Create Date:2022-07-28 20:25:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:heck_conflicting_open - see if the given file points to an inode that has* an existing open that would conflict with the* desired lease

Proto:static int check_conflicting_open(struct file *filp, const long arg, int flags)

Type:int

Parameter:

TypeParameterName
struct file *filp
const longarg
intflags
1776  inode = locks_inode(filp)
1777  self_wcount = 0 , self_rcount = 0
1779  If flags & utstanding pNFS layout Then Return 0
1782  If arg == F_RDLCK Then Return If inode_is_open_for_write(inode) Then -EAGAIN Else 0
1784  Else if arg != F_WRLCK Then Return 0
1793  If f_mode & le is open for writing Then self_wcount = 1
1795  Else if f_mode & le is open for reading Then self_rcount = 1
1798  If atomic_read( & i_writecount) != self_wcount || atomic_read( & struct files open RO ) != self_rcount Then Return -EAGAIN
1802  Return 0
Caller
NameDescribe
generic_add_lease