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

📄 vfs_races-2.6-suse.patch

📁 非常经典的一个分布式系统
💻 PATCH
字号:
 fs/dcache.c            |   24 ++++++++++++++++++++---- include/linux/dcache.h |    2 ++ 2 files changed, 22 insertions(+), 4 deletions(-)--- linux-2.6.0-test1/fs/dcache.c~vfs_races_2.5.72_rev1	2003-07-24 15:52:47.000000000 +0400+++ linux-2.6.0-test1-alexey/fs/dcache.c	2003-09-13 16:21:16.000000000 +0400@@ -212,7 +212,14 @@ int d_invalidate(struct dentry * dentry) 		spin_unlock(&dcache_lock); 		return 0; 	}-	/*++        /* network invalidation by Lustre */+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {+		spin_unlock(&dcache_lock);+		return 0;+	}++        /* 	 * Check whether to do a partial shrink_dcache 	 * to get rid of unused child entries. 	 */@@ -1135,14 +1142,23 @@ void d_delete(struct dentry * dentry)  * Adds a dentry to the hash according to its name.  */  -void d_rehash(struct dentry * entry)+void __d_rehash(struct dentry * entry, int lock) { 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);-	spin_lock(&dcache_lock);+	if (lock)+		spin_lock(&dcache_lock);  	entry->d_vfs_flags &= ~DCACHE_UNHASHED; 	entry->d_bucket = list;  	hlist_add_head_rcu(&entry->d_hash, list);-	spin_unlock(&dcache_lock);+	if (lock)+		spin_unlock(&dcache_lock);+}++EXPORT_SYMBOL(__d_rehash);++void d_rehash(struct dentry * entry)+{+	__d_rehash(entry, 1); }  #define do_switch(x,y) do { \--- linux-2.6.0-test1/include/linux/dcache.h~vfs_races_2.5.72_rev1	2003-09-13 16:21:05.000000000 +0400+++ linux-2.6.0-test1-alexey/include/linux/dcache.h	2003-09-13 16:21:16.000000000 +0400@@ -156,6 +156,8 @@ d_iput:		no		no		yes  #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */ #define DCACHE_UNHASHED		0x0010	+#define DCACHE_LUSTRE_INVALID     0x0020  /* Lustre invalidated */+  extern spinlock_t dcache_lock; _

⌨️ 快捷键说明

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