diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-03-27 16:49:38 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-04-03 21:08:09 +0200 |
commit | 989f881ebf77d70e883dd0fbcfa04a058d97f771 (patch) | |
tree | 2c9ab7de3394a05cc07f69062d63265627cbd25f /net/sunrpc/svcsock.c | |
parent | sunrpc: Remove unneeded pointer dereference (diff) | |
download | linux-989f881ebf77d70e883dd0fbcfa04a058d97f771.tar.xz linux-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); } /* |