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:
@@ -361,6 +361,15 @@ unsigned int nfs_page_length(struct page *page)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert a umode to a dirent->d_type
|
||||
*/
|
||||
static inline
|
||||
unsigned char nfs_umode_to_dtype(umode_t mode)
|
||||
{
|
||||
return (mode >> 12) & 15;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine the number of pages in an array of length 'len' and
|
||||
* with a base offset of 'base'
|
||||
|
Reference in New Issue
Block a user