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: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.

Proto:static void d_walk(struct dentry *parent, void *data, enum d_walk_ret (*enter)(void *, struct dentry *))

Type:void

Parameter:

TypeParameterName
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  spin_lock( & d_lock)
1283  ret = enter(data, this_parent)
1285  Case ret == D_WALK_CONTINUE
1286  Break
1287  Case ret == D_WALK_QUIT
1288  Case ret == D_WALK_SKIP
1289  Go to out_unlock
1290  Case ret == D_WALK_NORETRY
1291  retry = false
1292  Break
1294  repeat :
1295  next = next
1296  resume :
1297  When next != our children cycle
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 = next
1302  If Value for the false possibility is greater at compile time( protected by d_lock & DCACHE_DENTRY_CURSOR) Then Continue
1305  spin_lock_nested( & d_lock, DENTRY_D_LOCK_NESTED)
1307  ret = enter(data, dentry)
1309  Case ret == D_WALK_CONTINUE
1310  Break
1311  Case ret == D_WALK_QUIT
1312  spin_unlock( & d_lock)
1313  Go to out_unlock
1314  Case ret == D_WALK_NORETRY
1315  retry = false
1316  Break
1317  Case ret == D_WALK_SKIP
1318  spin_unlock( & d_lock)
1319  Continue
1323  spin_unlock( & d_lock)
1325  this_parent = dentry
1326  spin_acquire( & dep_map, 0, 1, _RET_IP_)
1327  Go to repeat
1329  spin_unlock( & d_lock)
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  If this_parent != parent Then
1337  child = this_parent
1338  this_parent = parent directory
1340  spin_unlock( & d_lock)
1341  spin_lock( & d_lock)
1344  If need_seqretry( & rename_lock, seq) Then Go to rename_retry
1347  Do
1348  next = next
1349  If next == our children Then Go to ascend
1352  When Value for the false possibility is greater at compile time( protected by d_lock & Parent inode is watched by some fsnotify listener ) cycle
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  Go to resume
1356  If need_seqretry( & rename_lock, seq) Then Go to 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  spin_unlock( & d_lock)
1362  done_seqretry( & rename_lock, seq)
1363  Return
1365  rename_retry :
1366  spin_unlock( & d_lock)
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  If Not retry Then Return
1371  seq = 1
1372  Go to again
Caller
NameDescribe
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_parentprune dcache
do_one_tree
d_invalidateinvalidate a dentry
d_genocide