diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-06-24 10:55:49 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-07-13 15:53:46 -0400 |
commit | 4720b0703a0dfcd6da6a308ea71aaacc55beade7 (patch) | |
tree | ba3ee87fa167e1678b47efccee59a21f42852395 /net | |
parent | fa9251afc33c81606d70cfe91800a779096442ec (diff) | |
download | talos-obmc-linux-4720b0703a0dfcd6da6a308ea71aaacc55beade7.tar.gz talos-obmc-linux-4720b0703a0dfcd6da6a308ea71aaacc55beade7.zip |
SUNRPC: Micro optimisation for svc_data_ready
Don't call svc_xprt_enqueue() if the XPT_DATA flag is already set.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svcsock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 03134708deeb..338d6fe1103d 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -409,8 +409,8 @@ static void svc_data_ready(struct sock *sk) svsk, sk, test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags)); svsk->sk_odata(sk); - set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); - svc_xprt_enqueue(&svsk->sk_xprt); + if (!test_and_set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags)) + svc_xprt_enqueue(&svsk->sk_xprt); } } |