lockd endianness annotations
Subsystems (2)
PATCH 3/25 lockd endianness annotations
Signed-off-by Alexey Dobriyan <[email protected]>
Signed-off-by Al Viro <[email protected]>
--- fs/lockd/clntlock.c | 4 +- fs/lockd/mon.c | 12 +++--- fs/lockd/svc4proc.c | 4 +- fs/lockd/svclock.c | 10 +++-- fs/lockd/svcproc.c | 8 ++-- fs/lockd/svcshare.c | 4 +- fs/lockd/svcsubs.c | 4 +- fs/lockd/xdr.c | 76 ++++++++++++++++++++--------------------- fs/lockd/xdr4.c | 80 ++++++++++++++++++++++--------------------- include/linux/lockd/lockd.h | 12 +++--- include/linux/lockd/share.h | 4 +- include/linux/lockd/xdr.h | 26 +++++++------- include/linux/lockd/xdr4.h | 26 +++++++------- 13 files changed, 135 insertions(+), 135 deletions(-)
fs/lockd/clntlock.c +2 -2
@@ -100,12 +100,12 @@ int nlmclnt_block(struct nlm_wait *block/* * 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.
fs/lockd/mon.c +6 -6
@@ -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;
@@ -176,7 +176,7 @@ xdr_encode_common(struct rpc_rqst *rqstp }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))
@@ -192,7 +192,7 @@ xdr_encode_mon(struct rpc_rqst *rqstp, u }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))
@@ -202,7 +202,7 @@ xdr_encode_unmon(struct rpc_rqst *rqstp, }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++);
@@ -212,7 +212,7 @@ xdr_decode_stat_res(struct rpc_rqst *rqs }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 ;
fs/lockd/svc4proc.c +2 -2
@@ -24,14 +24,14 @@ #define NLMDBG_FACILITY NLMDBG_CLIENT/* * 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)
fs/lockd/svclock.c +5 -5
@@ -334,13 +334,13 @@ static void nlmsvc_freegrantargs(struct* 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,
@@ -415,7 +415,7 @@ out:/* * Test for presence of a conflicting lock. */ -u32 +__be32 nlmsvc_testlock (struct nlm_file *file,struct nlm_lock *lock,struct nlm_lock *conflock) {
@@ -448,7 +448,7 @@ nlmsvc_testlock(struct nlm_file *file, s* 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;
@@ -476,7 +476,7 @@ nlmsvc_unlock(struct nlm_file *file, str* 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;
fs/lockd/svcproc.c +4 -4
@@ -22,8 +22,8 @@ #include <linux/lockd/sm_inter.h>#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 ){
@@ -52,14 +52,14 @@ #endif/* * 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; +__be32 error;/* nfsd callbacks must have been installed for this procedure */ if (!nlmsvc_ops)
fs/lockd/svcshare.c +2 -2
@@ -23,7 +23,7 @@ nlm_cmp_owner(struct nlm_share *share, s && !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) {
@@ -64,7 +64,7 @@ update:/* * Delete a share. */ -u32 +__be32 nlmsvc_unshare_file (struct nlm_host *host,struct nlm_file *file,struct nlm_args *argp) {
fs/lockd/svcsubs.c +2 -2
@@ -78,14 +78,14 @@ static inline unsigned int file_hash(str* 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);
fs/lockd/xdr.c +38 -38
251 lines not on this page · raw message
fs/lockd/xdr4.c +40 -40
261 lines not on this page · raw message
include/linux/lockd/lockd.h +6 -6
@@ -154,7 +154,7 @@ int nlm_async_reply(struct nlm_rqst *struct nlm_wait *nlmclnt_prepare_block (struct nlm_host *host,struct file_lock *fl);void nlmclnt_finish_block (struct nlm_wait *block);int nlmclnt_block (struct nlm_wait *block,struct nlm_rqst *req,long timeout); -u32 nlmclnt_grant (const struct sockaddr_in *addr,const struct nlm_lock *); +__be32 nlmclnt_grant (const struct sockaddr_in *addr,const struct nlm_lock *);void nlmclnt_recovery (struct nlm_host *);int nlmclnt_reclaim (struct nlm_host *,struct file_lock *);void nlmclnt_next_cookie (struct nlm_cookie *);
@@ -184,12 +184,12 @@ typedef int (*nlm_host_match_fn_t)(str/* * Server-side lock handling */ -u32 nlmsvc_lock (struct svc_rqst *,struct nlm_file *, +__be32 nlmsvc_lock (struct svc_rqst *,struct nlm_file *,struct nlm_lock *,int ,struct nlm_cookie *); -u32 nlmsvc_unlock (struct nlm_file *,struct nlm_lock *); -u32 nlmsvc_testlock (struct nlm_file *,struct nlm_lock *, +__be32 nlmsvc_unlock (struct nlm_file *,struct nlm_lock *); +__be32 nlmsvc_testlock (struct nlm_file *,struct nlm_lock *,struct nlm_lock *); -u32 nlmsvc_cancel_blocked (struct nlm_file *,struct nlm_lock *); +__be32 nlmsvc_cancel_blocked (struct nlm_file *,struct nlm_lock *);unsigned long nlmsvc_retry_blocked (void );void nlmsvc_traverse_blocks (struct nlm_host *,struct nlm_file *,nlm_host_match_fn_t match);
@@ -198,7 +198,7 @@ void nlmsvc_grant_reply(struct nlm_co/* * File handling for the server personality */ -u32 nlm_lookup_file (struct svc_rqst *,struct nlm_file **, +__be32 nlm_lookup_file (struct svc_rqst *,struct nlm_file **,struct nfs_fh *);void nlm_release_file (struct nlm_file *);void nlmsvc_mark_resources (void );
include/linux/lockd/share.h +2 -2
@@ -21,9 +21,9 @@ struct nlm_share {u32 s_mode;/* deny mode */ }; -u32 nlmsvc_share_file (struct nlm_host *,struct nlm_file *, +__be32 nlmsvc_share_file (struct nlm_host *,struct nlm_file *,struct nlm_args *); -u32 nlmsvc_unshare_file (struct nlm_host *,struct nlm_file *, +__be32 nlmsvc_unshare_file (struct nlm_host *,struct nlm_file *,struct nlm_args *);void nlmsvc_traverse_shares (struct nlm_host *,struct nlm_file *,nlm_host_match_fn_t );
include/linux/lockd/xdr.h +13 -13
@@ -86,19 +86,19 @@ struct nlm_reboot {*/ #define NLMSVC_XDRSIZE sizeof(struct nlm_args) -int nlmsvc_decode_testargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlmsvc_encode_testres (struct svc_rqst *,u32 *,struct nlm_res *); -int nlmsvc_decode_lockargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlmsvc_decode_cancargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlmsvc_decode_unlockargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlmsvc_encode_res (struct svc_rqst *,u32 *,struct nlm_res *); -int nlmsvc_decode_res (struct svc_rqst *,u32 *,struct nlm_res *); -int nlmsvc_encode_void (struct svc_rqst *,u32 *,void *); -int nlmsvc_decode_void (struct svc_rqst *,u32 *,void *); -int nlmsvc_decode_shareargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlmsvc_encode_shareres (struct svc_rqst *,u32 *,struct nlm_res *); -int nlmsvc_decode_notify (struct svc_rqst *,u32 *,struct nlm_args *); -int nlmsvc_decode_reboot (struct svc_rqst *,u32 *,struct nlm_reboot *); +int nlmsvc_decode_testargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlmsvc_encode_testres (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlmsvc_decode_lockargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlmsvc_decode_cancargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlmsvc_decode_unlockargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlmsvc_encode_res (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlmsvc_decode_res (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlmsvc_encode_void (struct svc_rqst *,__be32 *,void *); +int nlmsvc_decode_void (struct svc_rqst *,__be32 *,void *); +int nlmsvc_decode_shareargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlmsvc_encode_shareres (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlmsvc_decode_notify (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlmsvc_decode_reboot (struct svc_rqst *,__be32 *,struct nlm_reboot *);/* int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
include/linux/lockd/xdr4.h +13 -13
@@ -23,19 +23,19 @@ #define nlm4_failed __constant_htonl(NL -int nlm4svc_decode_testargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlm4svc_encode_testres (struct svc_rqst *,u32 *,struct nlm_res *); -int nlm4svc_decode_lockargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlm4svc_decode_cancargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlm4svc_decode_unlockargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlm4svc_encode_res (struct svc_rqst *,u32 *,struct nlm_res *); -int nlm4svc_decode_res (struct svc_rqst *,u32 *,struct nlm_res *); -int nlm4svc_encode_void (struct svc_rqst *,u32 *,void *); -int nlm4svc_decode_void (struct svc_rqst *,u32 *,void *); -int nlm4svc_decode_shareargs (struct svc_rqst *,u32 *,struct nlm_args *); -int nlm4svc_encode_shareres (struct svc_rqst *,u32 *,struct nlm_res *); -int nlm4svc_decode_notify (struct svc_rqst *,u32 *,struct nlm_args *); -int nlm4svc_decode_reboot (struct svc_rqst *,u32 *,struct nlm_reboot *); +int nlm4svc_decode_testargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlm4svc_encode_testres (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlm4svc_decode_lockargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlm4svc_decode_cancargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlm4svc_decode_unlockargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlm4svc_encode_res (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlm4svc_decode_res (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlm4svc_encode_void (struct svc_rqst *,__be32 *,void *); +int nlm4svc_decode_void (struct svc_rqst *,__be32 *,void *); +int nlm4svc_decode_shareargs (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlm4svc_encode_shareres (struct svc_rqst *,__be32 *,struct nlm_res *); +int nlm4svc_decode_notify (struct svc_rqst *,__be32 *,struct nlm_args *); +int nlm4svc_decode_reboot (struct svc_rqst *,__be32 *,struct nlm_reboot *);/* int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
Signature · 1 line
1.4.2.GIT