aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ced7291cc5f8..8ea4a4180a87 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -162,6 +162,7 @@ struct nfs_cache_array_entry {
162 u64 cookie; 162 u64 cookie;
163 u64 ino; 163 u64 ino;
164 struct qstr string; 164 struct qstr string;
165 unsigned char d_type;
165}; 166};
166 167
167struct nfs_cache_array { 168struct nfs_cache_array {
@@ -265,6 +266,7 @@ int nfs_readdir_add_to_array(struct nfs_entry *entry, struct page *page)
265 266
266 cache_entry->cookie = entry->prev_cookie; 267 cache_entry->cookie = entry->prev_cookie;
267 cache_entry->ino = entry->ino; 268 cache_entry->ino = entry->ino;
269 cache_entry->d_type = entry->d_type;
268 ret = nfs_readdir_make_qstr(&cache_entry->string, entry->name, entry->len); 270 ret = nfs_readdir_make_qstr(&cache_entry->string, entry->name, entry->len);
269 if (ret) 271 if (ret)
270 goto out; 272 goto out;
@@ -701,7 +703,6 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent,
701 int i = 0; 703 int i = 0;
702 int res = 0; 704 int res = 0;
703 struct nfs_cache_array *array = NULL; 705 struct nfs_cache_array *array = NULL;
704 unsigned int d_type = DT_UNKNOWN;
705 706
706 array = nfs_readdir_get_array(desc->page); 707 array = nfs_readdir_get_array(desc->page);
707 if (IS_ERR(array)) { 708 if (IS_ERR(array)) {
@@ -711,11 +712,11 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent,
711 712
712 for (i = desc->cache_entry_index; i < array->size; i++) { 713 for (i = desc->cache_entry_index; i < array->size; i++) {
713 struct nfs_cache_array_entry *ent; 714 struct nfs_cache_array_entry *ent;
714 d_type = DT_UNKNOWN;
715 715
716 ent = &array->array[i]; 716 ent = &array->array[i];
717 if (filldir(dirent, ent->string.name, ent->string.len, 717 if (filldir(dirent, ent->string.name, ent->string.len,
718 file->f_pos, nfs_compat_user_ino64(ent->ino), d_type) < 0) { 718 file->f_pos, nfs_compat_user_ino64(ent->ino),
719 ent->d_type) < 0) {
719 desc->eof = 1; 720 desc->eof = 1;
720 break; 721 break;
721 } 722 }