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:do_fcntl_add_lease

Proto:static int do_fcntl_add_lease(unsigned int fd, struct file *filp, long arg)

Type:int

Parameter:

TypeParameterName
unsigned intfd
struct file *filp
longarg
2088  fl = Allocate a file_lock initialised to this type of lease
2089  If IS_ERR(fl) Then Return PTR_ERR(fl)
2092  new = fasync_alloc()
2093  If Not new Then
2094  Free a lock which is not in use.
2095  Return -ENOMEM
2097  fa_fd = fd
2099  error = vfs_setlease - sets a lease on an open file*@filp: file pointer*@arg: type of lease to obtain*@lease: file_lock to use when adding a lease*@priv: private info for lm_setup when adding a lease (may be* NULL if lm_setup doesn't require it)
2100  If fl Then Free a lock which is not in use.
2102  If new Then NOTE! This can be used only for unused fasync entries:* entries that actually got inserted on the fasync list* need to be released by rcu - see fasync_remove_entry.
2104  Return error
Caller
NameDescribe
fcntl_setleasesets a lease on an open file