[Ocfs2-devel] [PATCH]2.6 fix for revalidating an inode

Rusty Lynch rusty at linux.co.intel.com
Thu Mar 11 14:59:49 CST 2004


The following minimal patch catches the case on a 2.6 system where
the passed in nameidata is null (which is a valid scenario.)

This is what is causing file deletion to crash.

    --rusty

Index: src/dcache.c
===================================================================
--- src/dcache.c	(revision 770)
+++ src/dcache.c	(working copy)
@@ -52,7 +52,7 @@
 	int needs_trunc;
 	ocfs_find_inode_args args;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	int flags = nd->flags;
+	int flags = nd ? nd->flags : 0;
 #endif
 
         LOG_ENTRY_ARGS ("(0x%08x, %d, '%*s')\n", dentry, flags,


More information about the Ocfs2-devel mailing list