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