函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\locks.c Create Date:2022-07-29 10:59:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:generic_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)

函数原型:int generic_setlease(struct file *filp, long arg, struct file_lock **flp, void **priv)

返回类型:int

参数:

类型参数名称
struct file *filp
longarg
struct file_lock **flp
void **priv
1967  inode等于locks_inode(filp)
1970  如果非uid_eq(current_fsuid(), i_uid)且非操作权限检查则返回:负EACCES
1972  如果非S_ISREG(i_mode)则返回:负EINVAL
1974  error等于security_file_lock(filp, arg)
1975  如果error则返回:error
1979  :arg恒等于F_UNLCK
1980  返回:generic_delete_lease(filp, * priv)
1981  :arg恒等于F_RDLCK
1982  :arg恒等于F_WRLCK
1983  如果非lm_break
1984  WARN_ON_ONCE(1)
1985  返回:负ENOLCK
1988  返回:generic_add_lease(filp, arg, flp, priv)
1989  默认
1990  返回:负EINVAL
调用者
名称描述
vfs_setleasevfs_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)