Skip to content

Commit 447c14d

Browse files
chuckleverJ. Bruce Fields
authored andcommitted
lockd: Update the NLMv4 nlm_res results encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 1beef14 commit 447c14d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

fs/lockd/xdr4.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,24 +344,23 @@ nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p)
344344
}
345345

346346
int
347-
nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p)
347+
nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p)
348348
{
349+
struct xdr_stream *xdr = &rqstp->rq_res_stream;
349350
struct nlm_res *resp = rqstp->rq_resp;
350351

351-
if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
352-
return 0;
353-
*p++ = resp->status;
354-
*p++ = xdr_zero; /* sequence argument */
355-
return xdr_ressize_check(rqstp, p);
352+
return svcxdr_encode_cookie(xdr, &resp->cookie) &&
353+
svcxdr_encode_stats(xdr, resp->status);
356354
}
357355

358356
int
359-
nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p)
357+
nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p)
360358
{
361359
struct nlm_res *resp = rqstp->rq_resp;
362360

363361
if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
364362
return 0;
365363
*p++ = resp->status;
364+
*p++ = xdr_zero; /* sequence argument */
366365
return xdr_ressize_check(rqstp, p);
367366
}

0 commit comments

Comments
 (0)