File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,15 +40,6 @@ loff_t_to_s64(loff_t offset)
4040 return res ;
4141}
4242
43- static __be32 *
44- nlm4_encode_cookie (__be32 * p , struct nlm_cookie * c )
45- {
46- * p ++ = htonl (c -> len );
47- memcpy (p , c -> data , c -> len );
48- p += XDR_QUADLEN (c -> len );
49- return p ;
50- }
51-
5243/*
5344 * NLM file handles are defined by specification to be a variable-length
5445 * XDR opaque no longer than 1024 bytes. However, this implementation
@@ -356,11 +347,16 @@ nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p)
356347int
357348nlm4svc_encode_shareres (struct svc_rqst * rqstp , __be32 * p )
358349{
350+ struct xdr_stream * xdr = & rqstp -> rq_res_stream ;
359351 struct nlm_res * resp = rqstp -> rq_resp ;
360352
361- if (!( p = nlm4_encode_cookie ( p , & resp -> cookie ) ))
353+ if (!svcxdr_encode_cookie ( xdr , & resp -> cookie ))
362354 return 0 ;
363- * p ++ = resp -> status ;
364- * p ++ = xdr_zero ; /* sequence argument */
365- return xdr_ressize_check (rqstp , p );
355+ if (!svcxdr_encode_stats (xdr , resp -> status ))
356+ return 0 ;
357+ /* sequence */
358+ if (xdr_stream_encode_u32 (xdr , 0 ) < 0 )
359+ return 0 ;
360+
361+ return 1 ;
366362}
You can’t perform that action at this time.
0 commit comments