On 11/30/2011 06:47 PM, Chris Dunlop wrote:
> On Wed, Nov 30, 2011 at 08:54:43AM +0000, David Howells wrote:
>> Acked-by: David Howells <dhowells@redh...>
>> It's also worth printing a message - this *is* a kernel bug of some description
>> if it happens.
> Like the below? This covers the d_revalidate for 9p, afs, coda,
> hfs, ncpfs, proc, sysfs.
> Note: jfs isn't susceptible to this problem, but the resolution
> doesn't look like the other file systems, and from the comment
> I'm not sure if the problem was really understood and if it's
> doing the right thing:
This code, as well as the comments, were copied from vfat. It seems
reasonable for case-insensitive but case-preserving behavior (not jfs's
default). The safe thing is to drop the negative dentry if we don't know
> static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
> * This may be nfsd (or something), anyway, we can't see the
> * intent of this. So, since this can be for creation, drop it.
> if (!nd)
> return 0;
> * Drop the negative dentry, in order to make sure to use the
> * case sensitive name which is specified by user if this is
> * for creation.
> if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
> return 0;