Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:d_alloc_parallel

Proto:struct dentry *d_alloc_parallel(struct dentry *parent, const struct qstr *name, wait_queue_head_t *wq)

Type:struct dentry

Parameter:

TypeParameterName
struct dentry *parent
const struct qstr *name
wait_queue_head_t *wq
2518  hash = hash
2519  b = in_lookup_hash(parent, hash)
2521  new = allocate a dcache entry
2525  If Value for the false possibility is greater at compile time(!new) Then Return ERR_PTR( - ENOMEM)
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  If Value for the false possibility is greater at compile time(dentry) Then
2536  Go to retry
2541  Go to 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  Return dentry
2547  If Value for the false possibility is greater at compile time(read_seqretry( & rename_lock, r_seq)) Then
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  Go to retry
2552  If Value for the false possibility is greater at compile time(seq & 1) Then
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  Go to retry
2557  hlist_bl_lock(b)
2558  If Value for the false possibility is greater at compile time(READ_ONCE(i_dir_seq) != seq) Then
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  Go to retry
2571  If hash != hash Then Continue
2573  If parent directory != parent Then Continue
2575  If Not d_same_name(dentry, parent, name) Then Continue
2577  hlist_bl_unlock(b)
2581  Go to 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  spin_lock( & d_lock)
2590  d_wait_lookup(dentry)
2597  If Value for the false possibility is greater at compile time(hash != hash) Then Go to mismatch
2599  If Value for the false possibility is greater at compile time( parent directory != parent) Then Go to mismatch
2601  If Value for the false possibility is greater at compile time(d_unhashed - is dentry hashed*@dentry: entry to check* Returns true if the dentry passed is not currently hashed.) Then Go to mismatch
2603  If Value for the false possibility is greater at compile time(!d_same_name(dentry, parent, name)) Then Go to mismatch
2606  spin_unlock( & d_lock)
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  Return 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  Return new
2617  mismatch :
2618  spin_unlock( & d_lock)
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  Go to retry
Caller
NameDescribe
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