diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-03-27 10:49:38 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-04-03 15:08:09 -0400 |
commit | 989f881ebf77d70e883dd0fbcfa04a058d97f771 (patch) | |
tree | 2c9ab7de3394a05cc07f69062d63265627cbd25f /net/sunrpc/svcsock.c | |
parent | 63a1b1569372860fdef9e25edfc2320766b2f4c2 (diff) |
svc: Simplify ->xpo_secure_port
Clean up: Instead of returning a value that is used to set or clear
a bit, just make ->xpo_secure_port mangle that bit, and return void.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 943f2a745cd5..9b6703588e35 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -391,9 +391,12 @@ static void svc_sock_setbufsize(struct socket *sock, unsigned int snd, | |||
391 | release_sock(sock->sk); | 391 | release_sock(sock->sk); |
392 | } | 392 | } |
393 | 393 | ||
394 | static int svc_sock_secure_port(struct svc_rqst *rqstp) | 394 | static void svc_sock_secure_port(struct svc_rqst *rqstp) |
395 | { | 395 | { |
396 | return svc_port_is_privileged(svc_addr(rqstp)); | 396 | if (svc_port_is_privileged(svc_addr(rqstp))) |
397 | set_bit(RQ_SECURE, &rqstp->rq_flags); | ||
398 | else | ||
399 | clear_bit(RQ_SECURE, &rqstp->rq_flags); | ||
397 | } | 400 | } |
398 | 401 | ||
399 | /* | 402 | /* |