Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dcache.c Create Date:2022-07-28 20:07:29
Last Modify:2020-03-18 10:27:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__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

Proto:struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)

Type:struct dentry

Parameter:

TypeParameterName
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  If hash != hash Then Continue
2374  spin_lock( & d_lock)
2375  If parent directory != parent Then Go to next
2377  If d_unhashed - is dentry hashed*@dentry: entry to check* Returns true if the dentry passed is not currently hashed. Then Go to next
2380  If Not d_same_name(dentry, parent, name) Then Go to next
2383  count++
2384  found = dentry
2385  spin_unlock( & d_lock)
2386  Break
2387  :
2388  spin_unlock( & d_lock)
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  Return found
Caller
NameDescribe
d_lookupsearch for a dentry