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:
@@ -6208,6 +6208,10 @@ __be32 *nfs4_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry,
|
||||
if (entry->fattr->valid & NFS_ATTR_FATTR_FILEID)
|
||||
entry->ino = entry->fattr->fileid;
|
||||
|
||||
entry->d_type = DT_UNKNOWN;
|
||||
if (entry->fattr->valid & NFS_ATTR_FATTR_TYPE)
|
||||
entry->d_type = nfs_umode_to_dtype(entry->fattr->mode);
|
||||
|
||||
if (verify_attr_len(xdr, p, len) < 0)
|
||||
goto out_overflow;
|
||||
|
||||
|
Reference in New Issue
Block a user