Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Enquire what lease is currently active

Proto:int fcntl_getlease(struct file *filp)

Type:int

Parameter:

TypeParameterName
struct file *filp
1738  inode = locks_inode(filp)
1740  type = F_UNLCK
1741  LIST_HEAD(dispose)
1743  ctx = smp_load_acquire( & i_flctx)
1744  If ctx && Not 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
1745  percpu_down_read( & file_rwsem)
1746  spin_lock( & flc_lock)
1747  time_out_leases(inode, & dispose)
1749  If fl_file != filp Then Continue
1751  type = target_leasetype(fl)
1752  Break
1754  spin_unlock( & flc_lock)
1755  percpu_up_read( & file_rwsem)
1757  locks_dispose_list( & dispose)
1759  Return type