博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
inode节点clear操作
阅读量:4153 次
发布时间:2019-05-25

本文共 990 字,大约阅读时间需要 3 分钟。

inode 节点clear是把节点设置处于一种状态,即 I_FREEING | I_CLEAR
 * I_FREEING		Set when inode is about to be freed but still has dirty *			pages or buffers attached or the inode itself is still *			dirty. * I_CLEAR		Added by clear_inode().  In this state the inode is *			clean and can be destroyed.  Inode keeps I_FREEING.
void clear_inode(struct inode *inode){	might_sleep();	/*	 * We have to cycle tree_lock here because reclaim can be still in the	 * process of removing the last page (in __delete_from_page_cache())	 * and we must not free mapping under it.	 */	spin_lock_irq(&inode->i_data.tree_lock);	BUG_ON(inode->i_data.nrpages);	BUG_ON(inode->i_data.nrexceptional);	spin_unlock_irq(&inode->i_data.tree_lock);	BUG_ON(!list_empty(&inode->i_data.private_list));	BUG_ON(!(inode->i_state & I_FREEING));	BUG_ON(inode->i_state & I_CLEAR);	BUG_ON(!list_empty(&inode->i_wb_list));	/* don't need i_lock here, no concurrent mods to i_state */	inode->i_state = I_FREEING | I_CLEAR;}EXPORT_SYMBOL(clear_inode);

转载地址:http://fwhti.baihongyu.com/

你可能感兴趣的文章
实验5-7 程序调试入门
查看>>
实验5-8 综合练习
查看>>
第2章实验补充C语言中如何计算补码
查看>>
深入入门正则表达式(java) - 命名捕获
查看>>
使用bash解析xml
查看>>
android系统提供的常用命令行工具
查看>>
【Python基础1】变量和字符串定义
查看>>
【Python基础2】python字符串方法及格式设置
查看>>
【Python】random生成随机数
查看>>
【Python基础3】数字类型与常用运算
查看>>
【Python基础4】for循环、while循环与if分支
查看>>
【Python基础6】格式化字符串
查看>>
【Python基础7】字典
查看>>
【Python基础8】函数参数
查看>>
【Python基础9】浅谈深浅拷贝及变量赋值
查看>>
Jenkins定制一个具有筛选功能的列表视图
查看>>
【Python基础10】探索模块
查看>>
【Python】将txt文件转换为html
查看>>
[Linux]Shell脚本实现按照模块信息拆分文件内容
查看>>
idea添加gradle模块报错The project is already registered
查看>>