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/nfs3xdr.c | |
parent | 3020093f578fb6c9acc6914dfd887a1ebd1db659 (diff) | |
download | blackbird-obmc-linux-0b26a0bf6ff398185546432420bb772bcfdf8d94.tar.gz blackbird-obmc-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/nfs3xdr.c')
-rw-r--r-- | fs/nfs/nfs3xdr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index e79e4f5f5d53..f6cc60f06dac 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -622,11 +622,13 @@ nfs3_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry, struct nfs_s entry->prev_cookie = entry->cookie; p = xdr_decode_hyper(p, &entry->cookie); + entry->d_type = DT_UNKNOWN; if (plus) { entry->fattr->valid = 0; p = xdr_decode_post_op_attr_stream(xdr, entry->fattr); if (IS_ERR(p)) goto out_overflow_exit; + entry->d_type = nfs_umode_to_dtype(entry->fattr->mode); /* In fact, a post_op_fh3: */ p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) |