Commit b17b8141 authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] Fix the vfat dentry handling fix

This adds the forgotten test whether it's negative dentry.  That test
should be needed only in negative dentry case.

Removes unneeded dcache_lock.

(NOTE: vfat still has the filename case problem on mkdir(), rename() etc.)
parent 13c8c7ec
......@@ -72,18 +72,21 @@ static struct dentry_operations vfat_dentry_ops[4] = {
static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
{
int ret = 1;
PRINTK1(("vfat_revalidate: %s\n", dentry->d_name.name));
spin_lock(&dcache_lock);
if (nd && !(nd->flags & LOOKUP_CONTINUE) && (nd->flags & LOOKUP_CREATE))
if (!dentry->d_inode &&
nd && !(nd->flags & LOOKUP_CONTINUE) && (nd->flags & LOOKUP_CREATE))
/*
* negative dentry is dropped, in order to make sure
* to use the name which a user desires if this is
* create path.
*/
ret = 0;
else if (dentry->d_time != dentry->d_parent->d_inode->i_version)
ret = 0;
spin_unlock(&dcache_lock);
else {
spin_lock(&dcache_lock);
if (dentry->d_time != dentry->d_parent->d_inode->i_version)
ret = 0;
spin_unlock(&dcache_lock);
}
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment