函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\locks.c Create Date:2022-07-29 10:59:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Ensure that fl->fl_file has compatible f_mode for F_SETLK calls

函数原型:static int check_fmode_for_setlk(struct file_lock *fl)

返回类型:int

参数:

类型参数名称
struct file_lock *fl
2430  :fl_type恒等于F_RDLCK
2431  如果非f_mode按位与le is open for reading 的值则返回:负EBADF
2433  退出
2434  :fl_type恒等于F_WRLCK
2435  如果非f_mode按位与le is open for writing 的值则返回:负EBADF
2438  返回:0
调用者
名称描述
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().