diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-01-02 20:06:41 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-02-20 17:20:16 +0300 |
commit | 26a949d1db9fd98b64ce4007da0d4a8d1c23ef22 (patch) | |
tree | 13d1ae1bed0f44837ae9afcf7fe24eac56abdcc9 /net | |
parent | c020fa695af64093acf689beaa39d9e956a55f23 (diff) | |
download | linux-26a949d1db9fd98b64ce4007da0d4a8d1c23ef22.tar.xz |
SUNRPC: Replace read_u32_from_xdr_buf() with existing XDR helper
Clean up / code de-duplication - this functionality is already
available in the generic XDR layer.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 19040145acd0..b123b4abe26e 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -891,19 +891,6 @@ out: } EXPORT_SYMBOL_GPL(svcauth_gss_register_pseudoflavor); -static inline int -read_u32_from_xdr_buf(struct xdr_buf *buf, int base, u32 *obj) -{ - __be32 raw; - int status; - - status = read_bytes_from_xdr_buf(buf, base, &raw, sizeof(*obj)); - if (status) - return status; - *obj = ntohl(raw); - return 0; -} - /* It would be nice if this bit of code could be shared with the client. * Obstacles: * The client shouldn't malloc(), would have to pass in own memory. @@ -937,8 +924,7 @@ unwrap_integ_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct g if (xdr_buf_subsegment(buf, &integ_buf, 0, integ_len)) goto unwrap_failed; - /* copy out mic... */ - if (read_u32_from_xdr_buf(buf, integ_len, &mic.len)) + if (xdr_decode_word(buf, integ_len, &mic.len)) goto unwrap_failed; if (mic.len > sizeof(gsd->gsd_scratch)) goto unwrap_failed; |