函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This 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.

函数原型:void locks_remove_posix(struct file *filp, fl_owner_t owner)

返回类型:void

参数:

类型参数名称
struct file *filp
fl_owner_towner
2667  inode等于locks_inode(filp)
2676  ctx等于smp_load_acquire( & i_flctx)
2677  如果非ctx链表为空则返回
2680  locks_init_lock( & lock)
2681  fl_type等于F_UNLCK
2682  fl_flags等于FL_POSIX按位或unlock on close
2683  fl_start等于0
2684  fl_end等于OFFSET_MAX
2685  fl_owner等于owner
2686  fl_pid等于tgid
2687  fl_file等于filp
2688  Callbacks for filesystems = NULL
2689  Callbacks for lockmanagers = NULL
2691  error等于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
2693  如果 Callbacks for filesystems fl_release_privatefl_release_private( & lock)
2695  trace_locks_remove_posix(inode, & lock, error)
调用者
名称描述
locks_remove_fileThis function is called on the last close of an open file.