函数逻辑报告 |
Source Code:fs\locks.c |
Create Date:2022-07-29 10:59:33 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:generic_add_lease
函数原型:static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp, void **priv)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | filp | |
long | arg | |
struct file_lock ** | flp | |
void ** | priv |
1809 | inode等于locks_inode(filp) |
1811 | is_deleg等于fl_flags按位与NFSv4 delegation |
1816 | trace_generic_add_lease(inode, lease) |
1819 | ctx等于locks_get_lock_context(inode, arg) |
1831 | 如果is_deleg且非inode_trylock(inode)则返回:负EAGAIN |
1841 | percpu_down_read( & file_rwsem) |
1842 | 加自旋锁 |
1843 | time_out_leases(inode, & dispose) |
1844 | error等于heck_conflicting_open - see if the given file points to an inode that has* an existing open that would conflict with the* desired lease |
1874 | 如果fl_flags按位与Lease is being broken 则转到:out |
1878 | 如果(my_fl != NULL)则 |
1883 | 转到:out_setup |
1887 | 如果非leases_enable则转到:out |
1890 | locks_insert_lock_ctx(lease, & flc_lease) |
1900 | smp_mb() |
1901 | error等于heck_conflicting_open - see if the given file points to an inode that has* an existing open that would conflict with the* desired lease |
1902 | 如果error则 |
1903 | locks_unlink_lock_ctx(lease) |
1904 | 转到:out |
1907 | out_setup : |
1910 | out : |
1911 | 自旋锁解锁 |
1912 | percpu_up_read( & file_rwsem) |
1913 | locks_dispose_list( & dispose) |
1914 | 如果is_deleg则inode_unlock(inode) |
1918 | 返回:error |
名称 | 描述 |
---|---|
generic_setlease | 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) |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |