Skip to content

Commit

Permalink
[PATCH] lockd endianness annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Acked-by: Trond Myklebust <[email protected]>
Acked-by: Neil Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 20, 2006
1 parent 7111c66 commit 52921e0
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 135 deletions.
4 changes: 2 additions & 2 deletions fs/lockd/clntlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout)
/*
* The server lockd has called us back to tell us the lock was granted
*/
u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock)
__be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock)
{
const struct file_lock *fl = &lock->fl;
const struct nfs_fh *fh = &lock->fh;
struct nlm_wait *block;
u32 res = nlm_lck_denied;
__be32 res = nlm_lck_denied;

/*
* Look up blocked request based on arguments.
Expand Down
12 changes: 6 additions & 6 deletions fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ nsm_create(void)
* XDR functions for NSM.
*/

static u32 *
xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
static __be32 *
xdr_encode_common(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp)
{
char buffer[20], *name;

Expand All @@ -176,7 +176,7 @@ xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
}

static int
xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
xdr_encode_mon(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp)
{
p = xdr_encode_common(rqstp, p, argp);
if (IS_ERR(p))
Expand All @@ -192,7 +192,7 @@ xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
}

static int
xdr_encode_unmon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
xdr_encode_unmon(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp)
{
p = xdr_encode_common(rqstp, p, argp);
if (IS_ERR(p))
Expand All @@ -202,7 +202,7 @@ xdr_encode_unmon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
}

static int
xdr_decode_stat_res(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp)
xdr_decode_stat_res(struct rpc_rqst *rqstp, __be32 *p, struct nsm_res *resp)
{
resp->status = ntohl(*p++);
resp->state = ntohl(*p++);
Expand All @@ -212,7 +212,7 @@ xdr_decode_stat_res(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp)
}

static int
xdr_decode_stat(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp)
xdr_decode_stat(struct rpc_rqst *rqstp, __be32 *p, struct nsm_res *resp)
{
resp->state = ntohl(*p++);
return 0;
Expand Down
4 changes: 2 additions & 2 deletions fs/lockd/svc4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
/*
* Obtain client and file from arguments
*/
static u32
static __be32
nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
struct nlm_host **hostp, struct nlm_file **filp)
{
struct nlm_host *host = NULL;
struct nlm_file *file = NULL;
struct nlm_lock *lock = &argp->lock;
u32 error = 0;
__be32 error = 0;

/* nfsd callbacks must have been installed for this procedure */
if (!nlmsvc_ops)
Expand Down
10 changes: 5 additions & 5 deletions fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ static void nlmsvc_freegrantargs(struct nlm_rqst *call)
* Attempt to establish a lock, and if it can't be granted, block it
* if required.
*/
u32
__be32
nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
struct nlm_lock *lock, int wait, struct nlm_cookie *cookie)
{
struct nlm_block *block, *newblock = NULL;
int error;
u32 ret;
__be32 ret;

dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n",
file->f_file->f_dentry->d_inode->i_sb->s_id,
Expand Down Expand Up @@ -415,7 +415,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
/*
* Test for presence of a conflicting lock.
*/
u32
__be32
nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock,
struct nlm_lock *conflock)
{
Expand Down Expand Up @@ -448,7 +448,7 @@ nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock,
* afterwards. In this case the block will still be there, and hence
* must be removed.
*/
u32
__be32
nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock)
{
int error;
Expand Down Expand Up @@ -476,7 +476,7 @@ nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock)
* be in progress.
* The calling procedure must check whether the file can be closed.
*/
u32
__be32
nlmsvc_cancel_blocked(struct nlm_file *file, struct nlm_lock *lock)
{
struct nlm_block *block;
Expand Down
8 changes: 4 additions & 4 deletions fs/lockd/svcproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#define NLMDBG_FACILITY NLMDBG_CLIENT

#ifdef CONFIG_LOCKD_V4
static u32
cast_to_nlm(u32 status, u32 vers)
static __be32
cast_to_nlm(__be32 status, u32 vers)
{
/* Note: status is assumed to be in network byte order !!! */
if (vers != 4){
Expand Down Expand Up @@ -52,14 +52,14 @@ cast_to_nlm(u32 status, u32 vers)
/*
* Obtain client and file from arguments
*/
static u32
static __be32
nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
struct nlm_host **hostp, struct nlm_file **filp)
{
struct nlm_host *host = NULL;
struct nlm_file *file = NULL;
struct nlm_lock *lock = &argp->lock;
u32 error = 0;
__be32 error = 0;

/* nfsd callbacks must have been installed for this procedure */
if (!nlmsvc_ops)
Expand Down
4 changes: 2 additions & 2 deletions fs/lockd/svcshare.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh)
&& !memcmp(share->s_owner.data, oh->data, oh->len);
}

u32
__be32
nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
struct nlm_args *argp)
{
Expand Down Expand Up @@ -64,7 +64,7 @@ nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
/*
* Delete a share.
*/
u32
__be32
nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
struct nlm_args *argp)
{
Expand Down
4 changes: 2 additions & 2 deletions fs/lockd/svcsubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ static inline unsigned int file_hash(struct nfs_fh *f)
* This is not quite right, but for now, we assume the client performs
* the proper R/W checking.
*/
u32
__be32
nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
struct nfs_fh *f)
{
struct hlist_node *pos;
struct nlm_file *file;
unsigned int hash;
u32 nfserr;
__be32 nfserr;

nlm_debug_print_fh("nlm_file_lookup", f);

Expand Down
Loading

0 comments on commit 52921e0

Please sign in to comment.