Coda File System

Re: a test case for symlink traversal problem

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Fri, 1 Feb 2002 18:44:15 -0500
On Fri, Feb 01, 2002 at 06:08:10PM -0500, Jan Harkes wrote:
> Ok, our readlink implementation isn't failing, and it's not a venus
> problem. There are only 3 possible places in the Coda kernel module that
> could be causing this, or else it is a race in the generic Linux VFS
> layers.

Not sure whether this fixes the readlink problems you're observing, but
I discovered an inverted test in the code that checks whether an entry
in the dentry cache is still valid. It should apply to pretty much any
2.4 or 2.5 kernel.

Jan

--- linux-2.4/fs/coda/dir.c.orig	Thu Jan 24 12:28:37 2002
+++ linux-2.4/fs/coda/dir.c	Fri Feb  1 18:39:27 2002
@@ -657,7 +657,7 @@
 		goto bad;
 
 	cii = ITOC(de->d_inode);
-	if (cii->c_flags & (C_PURGE | C_FLUSH))
+	if (!(cii->c_flags & (C_PURGE | C_FLUSH)))
 		goto out;
 
 	shrink_dcache_parent(de);
Received on 2002-02-01 18:44:18