Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Ensure that fl->fl_file has compatible f_mode for F_SETLK calls

Proto:static int check_fmode_for_setlk(struct file_lock *fl)

Type:int

Parameter:

TypeParameterName
struct file_lock *fl
2430  Case fl_type == F_RDLCK
2431  If Not (f_mode & le is open for reading ) Then Return -EBADF
2433  Break
2434  Case fl_type == F_WRLCK
2435  If Not (f_mode & le is open for writing ) Then Return -EBADF
2438  Return 0
Caller
NameDescribe
fcntl_setlkApply the lock described by l to an open file descriptor.* This implements both the F_SETLK and F_SETLKW commands of fcntl().
fcntl_setlk64Apply the lock described by l to an open file descriptor.* This implements both the F_SETLK and F_SETLKW commands of fcntl().