File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -41,18 +41,6 @@ loff_t_to_s32(loff_t offset)
41
41
return res ;
42
42
}
43
43
44
- /*
45
- * XDR functions for basic NLM types
46
- */
47
- static inline __be32 *
48
- nlm_encode_cookie (__be32 * p , struct nlm_cookie * c )
49
- {
50
- * p ++ = htonl (c -> len );
51
- memcpy (p , c -> data , c -> len );
52
- p += XDR_QUADLEN (c -> len );
53
- return p ;
54
- }
55
-
56
44
/*
57
45
* NLM file handles are defined by specification to be a variable-length
58
46
* XDR opaque no longer than 1024 bytes. However, this implementation
@@ -361,11 +349,16 @@ nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p)
361
349
int
362
350
nlmsvc_encode_shareres (struct svc_rqst * rqstp , __be32 * p )
363
351
{
352
+ struct xdr_stream * xdr = & rqstp -> rq_res_stream ;
364
353
struct nlm_res * resp = rqstp -> rq_resp ;
365
354
366
- if (!( p = nlm_encode_cookie ( p , & resp -> cookie ) ))
355
+ if (!svcxdr_encode_cookie ( xdr , & resp -> cookie ))
367
356
return 0 ;
368
- * p ++ = resp -> status ;
369
- * p ++ = xdr_zero ; /* sequence argument */
370
- return xdr_ressize_check (rqstp , p );
357
+ if (!svcxdr_encode_stats (xdr , resp -> status ))
358
+ return 0 ;
359
+ /* sequence */
360
+ if (xdr_stream_encode_u32 (xdr , 0 ) < 0 )
361
+ return 0 ;
362
+
363
+ return 1 ;
371
364
}
You can’t perform that action at this time.
0 commit comments