Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:posix_test_lock

Proto:void posix_test_lock(struct file *filp, struct file_lock *fl)

Type:void

Parameter:

TypeParameterName
struct file *filp
struct file_lock *fl
933  inode = locks_inode(filp)
935  ctx = smp_load_acquire( & i_flctx)
936  If Not ctx || list_empty_careful - tests whether a list is empty and not being modified*@head: the list to test* Description:* tests whether a list is empty _and_ checks that no other CPU might be* in the process of modifying either member (next or prev)* NOTE: using Then
937  fl_type = F_UNLCK
938  Return
941  spin_lock( & flc_lock)
943  If Determine if lock sys_fl blocks lock caller_fl. POSIX specific* checking before calling the locks_conflict(). Then
944  Initialize a new lock from an existing file_lock structure.
945  Go to out
948  fl_type = F_UNLCK
949  out :
950  spin_unlock( & flc_lock)
951  Return
Caller
NameDescribe
vfs_test_lockvfs_test_lock - test file byte range lock*@filp: The file to test lock for*@fl: The lock to test; also used to hold result* Returns -ERRNO on failure. Indicates presence of conflicting lock by* setting conf->fl_type to something other than F_UNLCK.