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>
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user