函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vfs_lock_file - file byte range lock*@filp: The file to apply the lock to*@cmd: type of locking operation (F_SETLK, F_GETLK, etc

函数原型:int vfs_lock_file(struct file *filp, unsigned int cmd, struct file_lock *fl, struct file_lock *conf)

返回类型:int

参数:

类型参数名称
struct file *filp
unsigned intcmd
struct file_lock *fl
struct file_lock *conf
2396  如果lock则返回:lock(filp, cmd, fl)
2398  否则返回:文件加POSIX锁
调用者
名称描述
do_lock_file_wait
locks_remove_posixThis function is called when the file is being removed* from the task's fd array. POSIX locks belonging to this task* are deleted at this time.