diff options
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index f84062f9a985..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, | |||
77 | 77 | ||
78 | cFYI(1, ("For %s", name->name)); | 78 | cFYI(1, ("For %s", name->name)); |
79 | 79 | ||
80 | if (parent->d_op && parent->d_op->d_hash) | ||
81 | parent->d_op->d_hash(parent, name); | ||
82 | else | ||
83 | name->hash = full_name_hash(name->name, name->len); | ||
84 | |||
80 | dentry = d_lookup(parent, name); | 85 | dentry = d_lookup(parent, name); |
81 | if (dentry) { | 86 | if (dentry) { |
82 | /* FIXME: check for inode number changes? */ | 87 | /* FIXME: check for inode number changes? */ |
@@ -666,12 +671,11 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst, | |||
666 | min(len, max_len), nlt, | 671 | min(len, max_len), nlt, |
667 | cifs_sb->mnt_cifs_flags & | 672 | cifs_sb->mnt_cifs_flags & |
668 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 673 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
674 | pqst->len -= nls_nullsize(nlt); | ||
669 | } else { | 675 | } else { |
670 | pqst->name = filename; | 676 | pqst->name = filename; |
671 | pqst->len = len; | 677 | pqst->len = len; |
672 | } | 678 | } |
673 | pqst->hash = full_name_hash(pqst->name, pqst->len); | ||
674 | /* cFYI(1, ("filldir on %s",pqst->name)); */ | ||
675 | return rc; | 679 | return rc; |
676 | } | 680 | } |
677 | 681 | ||