summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs2xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust2010-11-20 20:26:44 +0100
committerTrond Myklebust2010-11-22 19:24:48 +0100
commit0b26a0bf6ff398185546432420bb772bcfdf8d94 (patch)
tree705b94c8662cf18cf8cd18c6b8c68d751d87acb7 /fs/nfs/nfs2xdr.c
parentNFS: Correct the array bound calculation in nfs_readdir_add_to_array (diff)
downloadkernel-qcow2-linux-0b26a0bf6ff398185546432420bb772bcfdf8d94.tar.gz
kernel-qcow2-linux-0b26a0bf6ff398185546432420bb772bcfdf8d94.tar.xz
kernel-qcow2-linux-0b26a0bf6ff398185546432420bb772bcfdf8d94.zip
NFS: Ensure we return the dirent->d_type when it is known
Store the dirent->d_type in the struct nfs_cache_array_entry so that we can use it in getdents() calls. This fixes a regression with the new readdir code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs2xdr.c')
-rw-r--r--fs/nfs/nfs2xdr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index ab5937734f0b..5914a1911c95 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -485,6 +485,8 @@ nfs_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry, struct nfs_se
entry->prev_cookie = entry->cookie;
entry->cookie = ntohl(*p++);
+ entry->d_type = DT_UNKNOWN;
+
p = xdr_inline_peek(xdr, 8);
if (p != NULL)
entry->eof = !p[0] && p[1];