VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Nick Piggin <npiggin@kernel.dk> 2011-01-07 17:49:57 +1100 committer: Nick Piggin <npiggin@kernel.dk> 2011-01-07 17:50:29 +1100 commit: 34286d6662308d82aed891852d04c7c3a2649b16 parent: 44a7d7a878c9cbb74f236ea755b25b6b2e26a9a9
Commit Summary:
fs: rcu-walk aware d_revalidate method
Diffstat:
1 file changed, 5 insertions, 1 deletion
diff --git a/fs/hfs/sysdep.c b/fs/hfs/sysdep.c
index 7478f5c219aa..19cf291eb91f 100644
--- a/fs/hfs/sysdep.c
+++ b/fs/hfs/sysdep.c
@@ -8,15 +8,20 @@
  * This file contains the code to do various system dependent things.
  */
 
+#include <linux/namei.h>
 #include "hfs_fs.h"
 
 /* dentry case-handling: just lowercase everything */
 
 static int hfs_revalidate_dentry(struct dentry *dentry, struct nameidata *nd)
 {
-	struct inode *inode = dentry->d_inode;
+	struct inode *inode;
 	int diff;
 
+	if (nd->flags & LOOKUP_RCU)
+		return -ECHILD;
+
+	inode = dentry->d_inode;
 	if(!inode)
 		return 1;