Skip to content

Commit

Permalink
[PATCH] nfs: verifier is network-endian
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 20, 2006
1 parent 5704fde commit bc4785c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion fs/nfs/nfs3proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ nfs3_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
{
struct inode *dir = dentry->d_inode;
struct nfs_fattr dir_attr;
u32 *verf = NFS_COOKIEVERF(dir);
__be32 *verf = NFS_COOKIEVERF(dir);
struct nfs3_readdirargs arg = {
.fh = NFS_FH(dir),
.cookie = cookie,
Expand Down
6 changes: 3 additions & 3 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const u32 nfs4_fs_locations_bitmap[2] = {
| FATTR4_WORD1_MOUNTED_ON_FILEID
};

static void nfs4_setup_readdir(u64 cookie, u32 *verifier, struct dentry *dentry,
static void nfs4_setup_readdir(u64 cookie, __be32 *verifier, struct dentry *dentry,
struct nfs4_readdir_arg *readdir)
{
__be32 *start, *p;
Expand Down Expand Up @@ -2915,11 +2915,11 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po
.rpc_resp = clp,
.rpc_cred = cred,
};
u32 *p;
__be32 *p;
int loop = 0;
int status;

p = (u32*)sc_verifier.data;
p = (__be32*)sc_verifier.data;
*p++ = htonl((u32)clp->cl_boot_time.tv_sec);
*p = htonl((u32)clp->cl_boot_time.tv_nsec);

Expand Down
2 changes: 1 addition & 1 deletion include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ struct nfs_inode {
* This is the cookie verifier used for NFSv3 readdir
* operations
*/
__u32 cookieverf[2];
__be32 cookieverf[2];

/*
* This is the list of dirty unwritten pages.
Expand Down
8 changes: 4 additions & 4 deletions include/linux/nfs_xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ struct nfs_writeargs {

struct nfs_writeverf {
enum nfs3_stable_how committed;
__u32 verifier[2];
__be32 verifier[2];
};

struct nfs_writeres {
Expand Down Expand Up @@ -420,7 +420,7 @@ struct nfs3_createargs {
unsigned int len;
struct iattr * sattr;
enum nfs3_createmode createmode;
__u32 verifier[2];
__be32 verifier[2];
};

struct nfs3_mkdirargs {
Expand Down Expand Up @@ -467,7 +467,7 @@ struct nfs3_linkargs {
struct nfs3_readdirargs {
struct nfs_fh * fh;
__u64 cookie;
__u32 verf[2];
__be32 verf[2];
int plus;
unsigned int count;
struct page ** pages;
Expand Down Expand Up @@ -503,7 +503,7 @@ struct nfs3_linkres {

struct nfs3_readdirres {
struct nfs_fattr * dir_attr;
__u32 * verf;
__be32 * verf;
int plus;
};

Expand Down

0 comments on commit bc4785c

Please sign in to comment.