函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__dentry_kill

函数原型:static void __dentry_kill(struct dentry *dentry)

返回类型:void

参数:

类型参数名称
struct dentry *dentry
552  struct dentry * parent = NULL
553  bool can_free = true
554  如果非linux/include/linux/dcache.h* Dirent cache data structures* (C) Copyright 1997 Thomas Schoebel-Theuer,* with heavy changes by Linus Torvalds(dentry)则parent等于 parent directory
560  标记所引用失效
566  如果 protected by d_lock 按位与DCACHE_OP_PRUNEd_prune(dentry)
569  如果 protected by d_lock 按位与DCACHE_LRU_LIST
570  如果非 protected by d_lock 按位与DCACHE_SHRINK_LIST的值则d_lru_del(dentry)
574  删除目录项
575  dentry_unlist(dentry, parent)
576  如果parent自旋锁解锁
578  如果 Where the name belongs to - NULL is * negative Release the dentry's inode, using the filesystem* d_iput() operation if defined.
580  否则自旋锁解锁
582  this_cpu_dec(nr_dentry)
583  如果d_opd_released_release(dentry)
586  加自旋锁
587  如果 protected by d_lock 按位与DCACHE_SHRINK_LIST
588  protected by d_lock 或等于DCACHE_MAY_FREE
589  can_free = false
591  自旋锁解锁
592  如果此条件成立可能性大(为编译器优化)(can_free)则dentry_free(dentry)
594  cond_resched()
调用者
名称描述
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_parent收缩高速缓存区