函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__lock_parent

函数原型:static struct dentry *__lock_parent(struct dentry *dentry)

返回类型:struct dentry

参数:

类型参数名称
struct dentry *dentry
600  _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
601  自旋锁解锁
602  again :
603  parent等于READ_ONCE( parent directory )
604  加自旋锁
613  如果此条件成立可能性小(为编译器优化)(parent != parent directory )则
614  自旋锁解锁
615  转到:again
617  _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()
618  如果parent不等于dentryspin_lock_nested( & d_lock, DENTRY_D_LOCK_NESTED)
620  否则parent = NULL
622  返回:parent
调用者
名称描述
lock_parent
dentry_killFinish off a dentry we've decided to kill.* Returns dentry requiring refcount drop, or NULL if we're done.