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) | |
download | linux-stable-989f881ebf77d70e883dd0fbcfa04a058d97f771.tar.gz linux-stable-989f881ebf77d70e883dd0fbcfa04a058d97f771.tar.bz2 linux-stable-989f881ebf77d70e883dd0fbcfa04a058d97f771.zip |
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, release_sock(sock->sk); } -static int svc_sock_secure_port(struct svc_rqst *rqstp) +static void svc_sock_secure_port(struct svc_rqst *rqstp) { - return svc_port_is_privileged(svc_addr(rqstp)); + if (svc_port_is_privileged(svc_addr(rqstp))) + set_bit(RQ_SECURE, &rqstp->rq_flags); + else + clear_bit(RQ_SECURE, &rqstp->rq_flags); } /* |