aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-10-20 02:28:49 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 13:26:40 -0400
commit0dbb4c6799cf8fa8c5ba1926153a30960117477d (patch)
tree9d8f75f2f407a5758fa4ef3d8c03694f138c3304 /fs/nfs/dir.c
parent8687b63afbe42103730bff4d3f7bfff3463c303e (diff)
[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>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index c86a1ead4772..4133ef5264e5 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -142,12 +142,12 @@ nfs_opendir(struct inode *inode, struct file *filp)
142 return res; 142 return res;
143} 143}
144 144
145typedef u32 * (*decode_dirent_t)(u32 *, struct nfs_entry *, int); 145typedef __be32 * (*decode_dirent_t)(__be32 *, struct nfs_entry *, int);
146typedef struct { 146typedef struct {
147 struct file *file; 147 struct file *file;
148 struct page *page; 148 struct page *page;
149 unsigned long page_index; 149 unsigned long page_index;
150 u32 *ptr; 150 __be32 *ptr;
151 u64 *dir_cookie; 151 u64 *dir_cookie;
152 loff_t current_index; 152 loff_t current_index;
153 struct nfs_entry *entry; 153 struct nfs_entry *entry;
@@ -220,7 +220,7 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page)
220static inline 220static inline
221int dir_decode(nfs_readdir_descriptor_t *desc) 221int dir_decode(nfs_readdir_descriptor_t *desc)
222{ 222{
223 u32 *p = desc->ptr; 223 __be32 *p = desc->ptr;
224 p = desc->decode(p, desc->entry, desc->plus); 224 p = desc->decode(p, desc->entry, desc->plus);
225 if (IS_ERR(p)) 225 if (IS_ERR(p))
226 return PTR_ERR(p); 226 return PTR_ERR(p);