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:lease_get_mtime - update modified time of an inode with exclusive lease*@inode: the inode*@time: pointer to a timespec which contains the last modified time* This is to force NFS clients to flush their caches for files with* exclusive leases

Proto:void lease_get_mtime(struct inode *inode, struct timespec64 *time)

Type:void

Parameter:

TypeParameterName
struct inode *inode
struct timespec64 *time
1693  bool has_lease = false
1697  ctx = smp_load_acquire( & i_flctx)
1698  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
1699  spin_lock( & flc_lock)
1700  fl = list_first_entry_or_null - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.( & flc_lease, structfile_lock, fl_list)
1702  If fl && fl_type == F_WRLCK Then has_lease = true
1704  spin_unlock( & flc_lock)
1707  If has_lease Then time = rrent_time - Return FS time*@inode: inode.* Return the current time truncated to the time granularity supported by* the fs.* Note that inode and inode->sb cannot be NULL.* Otherwise, the function warns and returns time without truncation.