diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-11-20 14:26:44 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-11-22 13:24:48 -0500 |
commit | 0b26a0bf6ff398185546432420bb772bcfdf8d94 (patch) | |
tree | 705b94c8662cf18cf8cd18c6b8c68d751d87acb7 /fs/nfs/nfs2xdr.c | |
parent | 3020093f578fb6c9acc6914dfd887a1ebd1db659 (diff) | |
download | linux-0b26a0bf6ff398185546432420bb772bcfdf8d94.tar.gz |
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.c | 2 |
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]; |