⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dcache.c

📁 嵌入式系统设计与实例开发实验教材二源码 多线程应用程序设计 串行端口程序设计 AD接口实验 CAN总线通信实验 GPS通信实验 Linux内核移植与编译实验 IC卡读写实验 SD驱动使
💻 C
字号:
/* * Directory operations for InterMezzo filesystem * Original version: (C) 1996 P. Braam and M. Callahan * Rewritten for Linux 2.1. (C) 1997 Carnegie Mellon University * * Stelias encourages users to contribute improvements to * the InterMezzo project. Contact Peter Braam (coda@stelias.com). */#define __NO_VERSION__#include <linux/types.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/fs.h>#include <linux/stat.h>#include <linux/errno.h>#include <linux/locks.h>#include <asm/segment.h>#include <asm/uaccess.h>#include <linux/string.h>#include <linux/intermezzo_fs.h>static int presto_dentry_revalidate(struct dentry *de, int );/* called when a cache lookup succeeds */static int presto_dentry_revalidate(struct dentry *de, int flag){	struct inode *inode = de->d_inode;	ENTRY;	if (!inode) {		EXIT;		return 1;	}	if (is_bad_inode(inode)) {		EXIT;		return 0;	}	if ( S_ISDIR(inode->i_mode) ) {		EXIT;		return (presto_chk(de, PRESTO_DATA) &&			(presto_chk(de, PRESTO_ATTR)));	} else {		EXIT;		return presto_chk(de, PRESTO_ATTR);	}}static void presto_dentry_iput(struct dentry *dentry, struct inode *inode){	dentry->d_time = 0;	iput(inode);}struct dentry_operations presto_dentry_ops = {	d_revalidate: presto_dentry_revalidate,        d_iput: presto_dentry_iput};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -