Commit 05507fa2 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

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: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent ccd4bb1b
...@@ -77,6 +77,11 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name, ...@@ -77,6 +77,11 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
cFYI(1, ("For %s", name->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); dentry = d_lookup(parent, name);
if (dentry) { if (dentry) {
/* FIXME: check for inode number changes? */ /* FIXME: check for inode number changes? */
...@@ -671,8 +676,6 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst, ...@@ -671,8 +676,6 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst,
pqst->name = filename; pqst->name = filename;
pqst->len = len; pqst->len = len;
} }
pqst->hash = full_name_hash(pqst->name, pqst->len);
/* cFYI(1, ("filldir on %s",pqst->name)); */
return rc; return rc;
} }
......
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