cifs: fix dentry hash calculation for case-insensitive mounts

case-insensitive mounts shouldn't use full_name_hash(). Make sure we
use the parent dentry's d_hash routine when one is set.

Reported-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Jeff Layton 2010-02-05 13:30:36 -05:00 committed by Steve French
parent ccd4bb1beb
commit 05507fa2ac
1 changed files with 5 additions and 2 deletions

View File

@ -77,6 +77,11 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
cFYI(1, ("For %s", name->name));
if (parent->d_op && parent->d_op->d_hash)
parent->d_op->d_hash(parent, name);
else
name->hash = full_name_hash(name->name, name->len);
dentry = d_lookup(parent, name);
if (dentry) {
/* FIXME: check for inode number changes? */
@ -671,8 +676,6 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst,
pqst->name = filename;
pqst->len = len;
}
pqst->hash = full_name_hash(pqst->name, pqst->len);
/* cFYI(1, ("filldir on %s",pqst->name)); */
return rc;
}