File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,6 @@ loff_t_to_s64(loff_t offset)
40
40
return res ;
41
41
}
42
42
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
-
52
43
/*
53
44
* NLM file handles are defined by specification to be a variable-length
54
45
* XDR opaque no longer than 1024 bytes. However, this implementation
@@ -356,11 +347,16 @@ nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p)
356
347
int
357
348
nlm4svc_encode_shareres (struct svc_rqst * rqstp , __be32 * p )
358
349
{
350
+ struct xdr_stream * xdr = & rqstp -> rq_res_stream ;
359
351
struct nlm_res * resp = rqstp -> rq_resp ;
360
352
361
- if (!( p = nlm4_encode_cookie ( p , & resp -> cookie ) ))
353
+ if (!svcxdr_encode_cookie ( xdr , & resp -> cookie ))
362
354
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 ;
366
362
}
You can’t perform that action at this time.
0 commit comments