函数逻辑报告 |
Source Code:fs\libfs.c |
Create Date:2022-07-29 10:40:56 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Returns an element of siblings' list.* We are looking for <count>th positive after <p>; if* found, dentry is grabbed and returned to caller.* If no such element exists, NULL is returned.
函数原型:static struct dentry *scan_positives(struct dentry *cursor, struct list_head *p, loff_t count, struct dentry *last)
返回类型:struct dentry
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct dentry * | cursor | |
| struct list_head * | p | |
| loff_t | count | |
| struct dentry * | last |
| 103 | struct dentry * dentry = parent directory , * found = NULL |
| 105 | 加自旋锁 |
| 106 | 当p等于链表后项不等于 our children 循环 |
| 109 | 如果 protected by d_lock 按位与DCACHE_DENTRY_CURSOR则继续下一循环 |
| 111 | 如果simple_positive(d)且非count先自减则 |
| 112 | spin_lock_nested( & d_lock, DENTRY_D_LOCK_NESTED) |
| 113 | 如果simple_positive(d)则found等于得到锁引用 |
| 115 | 自旋锁解锁 |
| 116 | 如果此条件成立可能性大(为编译器优化)(found)则退出 |
| 118 | count等于1 |
| 120 | 如果need_resched()则 |
| 128 | 自旋锁解锁 |
| 130 | 返回:found |
| 名称 | 描述 |
|---|---|
| dcache_dir_lseek | |
| dcache_readdir | Directory is locked and all positive dentries in it are safe, since* for ramfs-type trees they can't go away without unlink() or rmdir(),* both impossible due to the lock on directory. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |