aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r--fs/nfsd/nfs4callback.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index f6ca9fb3fc63..f57655a7a2b6 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -85,8 +85,8 @@ enum nfs_cb_opnum4 {
85/* 85/*
86* Generic encode routines from fs/nfs/nfs4xdr.c 86* Generic encode routines from fs/nfs/nfs4xdr.c
87*/ 87*/
88static inline u32 * 88static inline __be32 *
89xdr_writemem(u32 *p, const void *ptr, int nbytes) 89xdr_writemem(__be32 *p, const void *ptr, int nbytes)
90{ 90{
91 int tmp = XDR_QUADLEN(nbytes); 91 int tmp = XDR_QUADLEN(nbytes);
92 if (!tmp) 92 if (!tmp)
@@ -205,7 +205,7 @@ nfs_cb_stat_to_errno(int stat)
205static int 205static int
206encode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr) 206encode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr)
207{ 207{
208 u32 * p; 208 __be32 * p;
209 209
210 RESERVE_SPACE(16); 210 RESERVE_SPACE(16);
211 WRITE32(0); /* tag length is always 0 */ 211 WRITE32(0); /* tag length is always 0 */
@@ -218,7 +218,7 @@ encode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr)
218static int 218static int
219encode_cb_recall(struct xdr_stream *xdr, struct nfs4_cb_recall *cb_rec) 219encode_cb_recall(struct xdr_stream *xdr, struct nfs4_cb_recall *cb_rec)
220{ 220{
221 u32 *p; 221 __be32 *p;
222 int len = cb_rec->cbr_fhlen; 222 int len = cb_rec->cbr_fhlen;
223 223
224 RESERVE_SPACE(12+sizeof(cb_rec->cbr_stateid) + len); 224 RESERVE_SPACE(12+sizeof(cb_rec->cbr_stateid) + len);
@@ -231,7 +231,7 @@ encode_cb_recall(struct xdr_stream *xdr, struct nfs4_cb_recall *cb_rec)
231} 231}
232 232
233static int 233static int
234nfs4_xdr_enc_cb_null(struct rpc_rqst *req, u32 *p) 234nfs4_xdr_enc_cb_null(struct rpc_rqst *req, __be32 *p)
235{ 235{
236 struct xdr_stream xdrs, *xdr = &xdrs; 236 struct xdr_stream xdrs, *xdr = &xdrs;
237 237
@@ -241,7 +241,7 @@ nfs4_xdr_enc_cb_null(struct rpc_rqst *req, u32 *p)
241} 241}
242 242
243static int 243static int
244nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, u32 *p, struct nfs4_cb_recall *args) 244nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, __be32 *p, struct nfs4_cb_recall *args)
245{ 245{
246 struct xdr_stream xdr; 246 struct xdr_stream xdr;
247 struct nfs4_cb_compound_hdr hdr = { 247 struct nfs4_cb_compound_hdr hdr = {
@@ -257,7 +257,7 @@ nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, u32 *p, struct nfs4_cb_recall *args
257 257
258static int 258static int
259decode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr){ 259decode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr){
260 u32 *p; 260 __be32 *p;
261 261
262 READ_BUF(8); 262 READ_BUF(8);
263 READ32(hdr->status); 263 READ32(hdr->status);
@@ -272,7 +272,7 @@ decode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr)
272static int 272static int
273decode_cb_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected) 273decode_cb_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected)
274{ 274{
275 u32 *p; 275 __be32 *p;
276 u32 op; 276 u32 op;
277 int32_t nfserr; 277 int32_t nfserr;
278 278
@@ -291,13 +291,13 @@ decode_cb_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected)
291} 291}
292 292
293static int 293static int
294nfs4_xdr_dec_cb_null(struct rpc_rqst *req, u32 *p) 294nfs4_xdr_dec_cb_null(struct rpc_rqst *req, __be32 *p)
295{ 295{
296 return 0; 296 return 0;
297} 297}
298 298
299static int 299static int
300nfs4_xdr_dec_cb_recall(struct rpc_rqst *rqstp, u32 *p) 300nfs4_xdr_dec_cb_recall(struct rpc_rqst *rqstp, __be32 *p)
301{ 301{
302 struct xdr_stream xdr; 302 struct xdr_stream xdr;
303 struct nfs4_cb_compound_hdr hdr; 303 struct nfs4_cb_compound_hdr hdr;
@@ -421,7 +421,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
421 421
422 /* Create RPC client */ 422 /* Create RPC client */
423 cb->cb_client = rpc_create(&args); 423 cb->cb_client = rpc_create(&args);
424 if (!cb->cb_client) { 424 if (IS_ERR(cb->cb_client)) {
425 dprintk("NFSD: couldn't create callback client\n"); 425 dprintk("NFSD: couldn't create callback client\n");
426 goto out_err; 426 goto out_err;
427 } 427 }
@@ -448,10 +448,10 @@ nfsd4_probe_callback(struct nfs4_client *clp)
448out_rpciod: 448out_rpciod:
449 atomic_dec(&clp->cl_count); 449 atomic_dec(&clp->cl_count);
450 rpciod_down(); 450 rpciod_down();
451 cb->cb_client = NULL;
452out_clnt: 451out_clnt:
453 rpc_shutdown_client(cb->cb_client); 452 rpc_shutdown_client(cb->cb_client);
454out_err: 453out_err:
454 cb->cb_client = NULL;
455 dprintk("NFSD: warning: no callback path to client %.*s\n", 455 dprintk("NFSD: warning: no callback path to client %.*s\n",
456 (int)clp->cl_name.len, clp->cl_name.data); 456 (int)clp->cl_name.len, clp->cl_name.data);
457} 457}
@@ -461,7 +461,7 @@ nfs4_cb_null(struct rpc_task *task, void *dummy)
461{ 461{
462 struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp; 462 struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp;
463 struct nfs4_callback *cb = &clp->cl_callback; 463 struct nfs4_callback *cb = &clp->cl_callback;
464 u32 addr = htonl(cb->cb_addr); 464 __be32 addr = htonl(cb->cb_addr);
465 465
466 dprintk("NFSD: nfs4_cb_null task->tk_status %d\n", task->tk_status); 466 dprintk("NFSD: nfs4_cb_null task->tk_status %d\n", task->tk_status);
467 467