函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:shrink_dentry_list

函数原型:void shrink_dentry_list(struct list_head *list)

返回类型:void

参数:

类型参数名称
struct list_head *list
1100  当非链表为空循环
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.(链表前项, structdentry, d_lru)
1104  加自旋锁
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  如果非Lock a dentry from shrink list
1107  bool can_free = false
1110  如果count小于0则can_free等于 protected by d_lock 按位与DCACHE_MAY_FREE
1113  如果can_freedentry_free(dentry)
1115  继续下一循环
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  如果parent不等于dentry__dput_to_list(parent, list)
1122  __dentry_kill(dentry)
调用者
名称描述
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_sb缩小一个超级块的数据缓存
shrink_dcache_parent收缩高速缓存区
mntput_no_expire
namespace_unlock