diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-02-05 19:30:36 +0100 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-02-08 18:52:34 +0100 |
commit | 05507fa2ac8d5e503bcf33ee43329449027d9060 (patch) | |
tree | 67c0ca8e766d07c5ef4d7a40515d4bf494560b25 /fs | |
parent | [CIFS] Don't cache timestamps on utimes due to coarse granularity (diff) | |
download | linux-05507fa2ac8d5e503bcf33ee43329449027d9060.tar.xz linux-05507fa2ac8d5e503bcf33ee43329449027d9060.zip |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/readdir.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index f5618f8cc462..c343b14ba2d3 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -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; } |