函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:d_alloc_parallel

函数原型:struct dentry *d_alloc_parallel(struct dentry *parent, const struct qstr *name, wait_queue_head_t *wq)

返回类型:struct dentry

参数:

类型参数名称
struct dentry *parent
const struct qstr *name
wait_queue_head_t *wq
2518  hash等于hash
2519  b等于in_lookup_hash(parent, hash)
2521  new等于分配高速缓存区
2525  如果此条件成立可能性小(为编译器优化)(!new)则返回:错误号
2528  retry :
2529  _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
2530  seq等于smp_load_acquire( & i_dir_seq)
2531  r_seq等于Read side functions for starting and finalizing a read side section.
2532  dentry等于__d_lookup_rcu - search for a dentry (racy, store-free)*@parent: parent dentry*@name: qstr of name we wish to find*@seqp: returns d_seq value at the point where the dentry was found* Returns: dentry, or NULL* __d_lookup_rcu is the dcache lookup function
2533  如果此条件成立可能性小(为编译器优化)(dentry)则
2534  如果非 有引用则递增计数
2536  转到:retry
2541  转到:retry
2543  _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()
2544  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
2545  返回:dentry
2547  如果此条件成立可能性小(为编译器优化)(read_seqretry( & rename_lock, r_seq))则
2548  _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()
2549  转到:retry
2552  如果此条件成立可能性小(为编译器优化)(seq & 1)则
2553  _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()
2554  转到:retry
2557  hlist_bl_lock(b)
2558  如果此条件成立可能性小(为编译器优化)(READ_ONCE(i_dir_seq) != seq)则
2559  hlist_bl_unlock(b)
2560  _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()
2561  转到:retry
2571  如果hash不等于hash则继续下一循环
2573  如果 parent directory 不等于parent则继续下一循环
2575  如果非d_same_name(dentry, parent, name)则继续下一循环
2577  hlist_bl_unlock(b)
2579  如果非 有引用则递增计数
2581  转到:retry
2584  _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()
2589  加自旋锁
2590  d_wait_lookup(dentry)
2597  如果此条件成立可能性小(为编译器优化)(hash != hash)则转到:mismatch
2599  如果此条件成立可能性小(为编译器优化)( parent directory != parent)则转到:mismatch
2601  如果此条件成立可能性小(为编译器优化)(目录项存在于哈希中)则转到:mismatch
2603  如果此条件成立可能性小(为编译器优化)(!d_same_name(dentry, parent, name))则转到:mismatch
2606  自旋锁解锁
2607  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
2608  返回:dentry
2610  _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()
2612  protected by d_lock 或等于g looked up (with parent locked shared)
2613  in-lookup ones only 等于wq
2614  hlist_bl_add_head_rcu*@n: the element to add to the hash list
2615  hlist_bl_unlock(b)
2616  返回:new
2617  mismatch :
2618  自旋锁解锁
2619  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
2620  转到:retry
调用者
名称描述
lookup_openLook up and maybe create and open the last component
d_add_cid_add_ci - lookup or allocate new dentry with case-exact name*@inode: the inode case-insensitive lookup has found*@dentry: the negative dentry that was passed to the parent's lookup func*@name: the case-exact name to be associated with the returned