Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__dentry_kill

Proto:static void __dentry_kill(struct dentry *dentry)

Type:void

Parameter:

TypeParameterName
struct dentry *dentry
552  struct dentry * parent = NULL
553  bool can_free = true
554  If Not linux/include/linux/dcache.h* Dirent cache data structures* (C) Copyright 1997 Thomas Schoebel-Theuer,* with heavy changes by Linus Torvalds(dentry) Then parent = parent directory
560  lockref_mark_dead - mark lockref dead*@lockref: pointer to lockref structure
566  If protected by d_lock & DCACHE_OP_PRUNE Then d_prune(dentry)
569  If protected by d_lock & DCACHE_LRU_LIST Then
570  If Not ( protected by d_lock & DCACHE_SHRINK_LIST) Then d_lru_del(dentry)
574  drop a dentry
575  dentry_unlist(dentry, parent)
576  If parent Then spin_unlock( & d_lock)
578  If Where the name belongs to - NULL is * negative Then Release the dentry's inode, using the filesystem* d_iput() operation if defined.
580  Else spin_unlock( & d_lock)
582  this_cpu_dec(nr_dentry)
583  If d_op && d_release Then d_release(dentry)
586  spin_lock( & d_lock)
587  If protected by d_lock & DCACHE_SHRINK_LIST Then
588  protected by d_lock |= DCACHE_MAY_FREE
589  can_free = false
591  spin_unlock( & d_lock)
592  If Value is more likely to compile time(can_free) Then dentry_free(dentry)
594  cond_resched()
Caller
NameDescribe
dentry_killFinish off a dentry we've decided to kill.* Returns dentry requiring refcount drop, or NULL if we're done.
d_prune_aliasesTry to kill dentries associated with this inode.* WARNING: you must own a reference to inode.
shrink_dentry_list
shrink_dcache_parentprune dcache