Skip to contentSkip to conversation

2.6 fix for revalidating an inode

PATCH In review Rusty Lynch 2 participants 2 messages Mar 11, 2004 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.6 fix for revalidating an inode

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
dcache.c +1 -1
Index: src/dcache.c
===================================================================
@@ -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,
#1 lore raw
Quoted 4 lines · Rusty Lynch

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.

Ok, that one was easy to commit :)

	--Mark

--
Mark Fasheh
Software Developer, Oracle Corp
[email protected]