Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:shrink_dentry_list

Proto:void shrink_dentry_list(struct list_head *list)

Type:void

Parameter:

TypeParameterName
struct list_head *list
1100  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
1103  dentry = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(prev, structdentry, d_lru)
1104  spin_lock( & d_lock)
1105  _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
1106  If Not Lock a dentry from shrink list Then
1107  bool can_free = false
1112  spin_unlock( & d_lock)
1113  If can_free Then dentry_free(dentry)
1115  Continue
1117  _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()
1118  d_shrink_del(dentry)
1119  parent = parent directory
1120  If parent != dentry Then __dput_to_list(parent, list)
1122  __dentry_kill(dentry)
Caller
NameDescribe
prune_dcache_sbprune_dcache_sb - shrink the dcache*@sb: superblock*@sc: shrink control, passed to list_lru_shrink_walk()* Attempt to shrink the superblock dcache LRU by @sc->nr_to_scan entries
shrink_dcache_sbshrink dcache for a superblock
shrink_dcache_parentprune dcache
mntput_no_expire
namespace_unlock