Function report |
Source Code:fs\libfs.c |
Create Date:2022-07-28 20:10:23 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:static struct dentry *scan_positives(struct dentry *cursor, struct list_head *p, loff_t count, struct dentry *last)
Type:struct dentry
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct dentry * | cursor | |
| struct list_head * | p | |
| loff_t | count | |
| struct dentry * | last |
| 103 | struct dentry * dentry = parent directory , * found = NULL |
| 106 | When (p = next) != our children cycle |
| 109 | If protected by d_lock & DCACHE_DENTRY_CURSOR Then Continue |
| 111 | If simple_positive(d) && Not --count Then |
| 112 | spin_lock_nested( & d_lock, DENTRY_D_LOCK_NESTED) |
| 113 | If simple_positive(d) Then found = get a reference to a dentry |
| 115 | spin_unlock( & d_lock) |
| 116 | If Value is more likely to compile time(found) Then Break |
| 118 | count = 1 |
| 120 | If need_resched() Then |
| 128 | spin_unlock( & d_lock) |
| 130 | Return found |
| Name | Describe |
|---|---|
| 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. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |