函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:d_walk - walk the dentry tree*@parent: start of walk*@data: data passed to @enter() and @finish()*@enter: callback when first entering the dentry* The @enter() callbacks are called with d_lock held.

函数原型:static void d_walk(struct dentry *parent, void *data, enum d_walk_ret (*enter)(void *, struct dentry *))

返回类型:void

参数:

类型参数名称
struct dentry *parent
void *data
enum d_walk_ret (*enter
1274  seq等于0
1276  bool retry = true
1278  again :
1279  ad_seqbegin_or_lock - begin a sequence number check or locking block*@lock: sequence lock*@seq : sequence number to be checked* First try it once optimistically without taking the lock. If that fails,* take the lock
1280  this_parent等于parent
1281  加自旋锁
1283  ret等于enter(data, this_parent)
1285  :ret恒等于D_WALK_CONTINUE
1286  退出
1287  :ret恒等于D_WALK_QUIT
1288  :ret恒等于D_WALK_SKIP
1289  转到:out_unlock
1290  :ret恒等于D_WALK_NORETRY
1291  retry = false
1292  退出
1294  repeat :
1295  next等于链表后项
1296  resume :
1297 next不等于 our children 循环
1298  tmp等于next
1299  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.(tmp, structdentry, d_child)
1300  next等于链表后项
1302  如果此条件成立可能性小(为编译器优化)( protected by d_lock & DCACHE_DENTRY_CURSOR)则继续下一循环
1305  spin_lock_nested( & d_lock, DENTRY_D_LOCK_NESTED)
1307  ret等于enter(data, dentry)
1309  :ret恒等于D_WALK_CONTINUE
1310  退出
1311  :ret恒等于D_WALK_QUIT
1313  转到:out_unlock
1314  :ret恒等于D_WALK_NORETRY
1315  retry = false
1316  退出
1317  :ret恒等于D_WALK_SKIP
1319  继续下一循环
1322  如果非链表为空
1325  this_parent等于dentry
1326  spin_acquire( & dep_map, 0, 1, _RET_IP_)
1327  转到:repeat
1329  自旋锁解锁
1334  _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
1335  ascend :
1336  如果this_parent不等于parent
1337  child等于this_parent
1338  this_parent等于 parent directory
1340  自旋锁解锁
1341  加自旋锁
1344  如果need_seqretry( & rename_lock, seq)则转到:rename_retry
1347  循环
1348  next等于链表后项
1349  如果next恒等于 our children 则转到:ascend
1352 此条件成立可能性小(为编译器优化)( protected by d_lock & Parent inode is watched by some fsnotify listener )循环
1353  _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()
1354  转到:resume
1356  如果need_seqretry( & rename_lock, seq)则转到:rename_retry
1358  _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()
1360  out_unlock :
1361  自旋锁解锁
1362  done_seqretry( & rename_lock, seq)
1363  返回
1365  rename_retry :
1366  自旋锁解锁
1367  _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()
1368  BUG_ON(seq & 1)
1369  如果非retry则返回
1371  seq等于1
1372  转到:again
调用者
名称描述
path_has_submountspath_has_submounts - check for mounts over a dentry in the* current namespace.*@parent: path to check.* Return true if the parent or its subdirectories contain* a mount point in the current namespace.
shrink_dcache_parent收缩高速缓存区
do_one_tree
d_invalidate废除目录项
d_genocide