函数逻辑报告 |
Source Code:fs\locks.c |
Create Date:2022-07-29 10:59:31 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:撤销所有未偿还的文件
函数原型:int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct inode * | inode | |
unsigned int | mode | |
unsigned int | type |
1580 | error等于0 |
1584 | want_write等于mode按位与O_ACCMODE的值不等于O_RDONLY |
1593 | ctx等于smp_load_acquire( & i_flctx) |
1594 | 如果非ctx则 |
1595 | WARN_ON_ONCE(1) |
1596 | 转到:free_lock |
1599 | percpu_down_read( & file_rwsem) |
1600 | 加自旋锁 |
1602 | time_out_leases(inode, & dispose) |
1604 | 如果非any_leases_conflict(inode, new_fl)则转到:out |
1607 | break_time等于0 |
1608 | 如果lease_break_time大于0则 |
1609 | break_time等于jiffies加lease_break_time乘HZ |
1610 | 如果break_time恒等于0则break_time自加 |
1615 | 如果非leases_conflict(fl, new_fl)则继续下一循环 |
1617 | 如果want_write则 |
1618 | 如果fl_flags按位与Lease is being broken 则继续下一循环 |
1620 | fl_flags或等于Lease is being broken |
1621 | for lease breaks: 等于break_time |
1622 | 否则 |
1623 | 如果lease_breaking(fl)则继续下一循环 |
1626 | fl_downgrade_time等于break_time |
1628 | 如果lm_break(fl)则locks_delete_lock_ctx(fl, & dispose) |
1635 | 如果mode按位与O_NONBLOCK则 |
1641 | restart : |
1643 | break_time等于 for lease breaks: |
1644 | 如果break_time不等于0则break_time减等于jiffies |
1646 | 如果break_time恒等于0则break_time自加 |
1649 | trace_break_lease_block(inode, new_fl) |
1650 | 自旋锁解锁 |
1651 | percpu_up_read( & file_rwsem) |
1653 | locks_dispose_list( & dispose) |
1657 | percpu_down_read( & file_rwsem) |
1658 | 加自旋锁 |
1659 | trace_break_lease_unblock(inode, new_fl) |
1661 | 如果error大于等于0则 |
1666 | 如果error恒等于0则time_out_leases(inode, & dispose) |
1668 | 如果any_leases_conflict(inode, new_fl)则转到:restart |
1670 | error等于0 |
1672 | out : |
1673 | 自旋锁解锁 |
1674 | percpu_up_read( & file_rwsem) |
1675 | locks_dispose_list( & dispose) |
1676 | free_lock : |
1678 | 返回:error |
名称 | 描述 |
---|---|
break_lease | |
break_deleg | |
break_layout |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |