Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:generic_delete_lease

Proto:static int generic_delete_lease(struct file *filp, void *owner)

Type:int

Parameter:

TypeParameterName
struct file *filp
void *owner
1923  error = -EAGAIN
1924  struct file_lock * fl, * victim = NULL
1925  inode = locks_inode(filp)
1927  LIST_HEAD(dispose)
1929  ctx = smp_load_acquire( & i_flctx)
1930  If Not ctx Then
1931  trace_generic_delete_lease(inode, NULL)
1932  Return error
1935  percpu_down_read( & file_rwsem)
1936  spin_lock( & flc_lock)
1938  If fl_file == filp && fl_owner == owner Then
1940  victim = fl
1941  Break
1944  trace_generic_delete_lease(inode, victim)
1945  If victim Then error = lm_change(victim, F_UNLCK, & dispose)
1947  spin_unlock( & flc_lock)
1948  percpu_up_read( & file_rwsem)
1949  locks_dispose_list( & dispose)
1950  Return error
Caller
NameDescribe
generic_setleasegeneric_setlease - sets a lease on an open file*@filp: file pointer*@arg: type of lease to obtain*@flp: input - file_lock to use, output - file_lock inserted*@priv: private data for lm_setup (may be NULL if lm_setup* doesn't require it)* The (input)