函数逻辑报告 |
Source Code:fs\dcache.c |
Create Date:2022-07-29 10:37:31 |
Last Modify:2020-03-18 10:27:32 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__d_alloc - allocate a dcache entry*@sb: filesystem it will belong to*@name: qstr of the name* Allocates a dentry. It returns %NULL if there is insufficient memory* available. On a success the dentry is returned. The name passed in is
函数原型:static struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
返回类型:struct dentry
参数:
类型 | 参数 | 名称 |
---|---|---|
struct super_block * | sb | |
const struct qstr * | name |
1691 | 如果非dentry则返回:NULL |
1700 | small names [128 bytes - 1]等于0 |
1701 | 如果此条件成立可能性小(为编译器优化)(!name)则 |
1702 | name等于slash_name |
1703 | dname等于 small names |
1705 | size等于offsetof(structexternal_name, name[1]) |
1709 | 如果非p则 |
1710 | kmem_cache_free(dentry_cache, dentry) |
1711 | 返回:NULL |
1713 | atomic_set( & count, 1) |
1715 | 否则 |
1716 | dname等于 small names |
1725 | smp_store_release( & name, dname) |
1727 | count等于1 |
1728 | protected by d_lock 等于0 |
1729 | spin_lock_init( & d_lock) |
1730 | seqcount_init( & per dentry seqlock ) |
1731 | Where the name belongs to - NULL is * negative = NULL |
1732 | parent directory 等于dentry |
1733 | The root of the dentry tree 等于sb |
1734 | d_op = NULL |
1735 | fs-specific data = NULL |
1736 | INIT_HLIST_BL_NODE( & lookup hash list ) |
1737 | 初始化链表头 |
1738 | 初始化链表头 |
1739 | INIT_HLIST_NODE( & de alias list ) |
1740 | 初始化链表头 |
1741 | d_set_d_op(dentry, s_d_op) |
1745 | 如果err则 |
1753 | this_cpu_inc(nr_dentry) |
1755 | 返回:dentry |
名称 | 描述 |
---|---|
d_alloc | 分配高速缓存区 |
d_alloc_anon | |
d_alloc_pseudo | d_alloc_pseudo - allocate a dentry (for lookup-less filesystems)*@sb: the superblock*@name: qstr of the name* For a filesystem that just pins its dentries in memory and never* performs lookups at all, return an unhashed IS_ROOT dentry. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |