[PATCH] xdr annotations: NFS readdir entries
on-the-wire data is big-endian [in large part pulled from Alexey's patch] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -142,12 +142,12 @@ nfs_opendir(struct inode *inode, struct file *filp)
|
||||
return res;
|
||||
}
|
||||
|
||||
typedef u32 * (*decode_dirent_t)(u32 *, struct nfs_entry *, int);
|
||||
typedef __be32 * (*decode_dirent_t)(__be32 *, struct nfs_entry *, int);
|
||||
typedef struct {
|
||||
struct file *file;
|
||||
struct page *page;
|
||||
unsigned long page_index;
|
||||
u32 *ptr;
|
||||
__be32 *ptr;
|
||||
u64 *dir_cookie;
|
||||
loff_t current_index;
|
||||
struct nfs_entry *entry;
|
||||
@@ -220,7 +220,7 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page)
|
||||
static inline
|
||||
int dir_decode(nfs_readdir_descriptor_t *desc)
|
||||
{
|
||||
u32 *p = desc->ptr;
|
||||
__be32 *p = desc->ptr;
|
||||
p = desc->decode(p, desc->entry, desc->plus);
|
||||
if (IS_ERR(p))
|
||||
return PTR_ERR(p);
|
||||
|
Reference in New Issue
Block a user