Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:void locks_remove_posix(struct file *filp, fl_owner_t owner)

Type:void

Parameter:

TypeParameterName
struct file *filp
fl_owner_towner
2667  inode = locks_inode(filp)
2676  ctx = smp_load_acquire( & i_flctx)
2677  If Not ctx || list_empty - tests whether a list is empty*@head: the list to test. Then Return
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  If Callbacks for filesystems && fl_release_private Then fl_release_private( & lock)
2695  trace_locks_remove_posix(inode, & lock, error)
Caller
NameDescribe
locks_remove_fileThis function is called on the last close of an open file.