函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dcache.c Create Date:2022-07-29 10:37:33
Last Modify:2020-03-18 10:27:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__d_lookup - search for a dentry (racy)*@parent: parent dentry*@name: qstr of name we wish to find* Returns: dentry, or NULL* __d_lookup is like d_lookup, however it may (rarely) return a* false-negative result due to unrelated rename activity

函数原型:struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)

返回类型:struct dentry

参数:

类型参数名称
const struct dentry *parent
const struct qstr *name
2341  hash等于hash
2342  b等于d_hash(hash)
2344  struct dentry * found = NULL
2367  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2371  如果hash不等于hash则继续下一循环
2374  加自旋锁
2375  如果 parent directory 不等于parent则转到:next
2377  如果目录项存在于哈希中则转到:next
2380  如果非d_same_name(dentry, parent, name)则转到:next
2383  count自加
2384  found等于dentry
2385  自旋锁解锁
2386  退出
2387  :
2388  自旋锁解锁
2390  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
2392  返回:found
调用者
名称描述
d_lookup查找目录项