mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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>
This commit is contained in:
parent
fa9251afc3
commit
4720b0703a
1 changed files with 2 additions and 2 deletions
|
@ -409,8 +409,8 @@ static void svc_data_ready(struct sock *sk)
|
||||||
svsk, sk,
|
svsk, sk,
|
||||||
test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags));
|
test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags));
|
||||||
svsk->sk_odata(sk);
|
svsk->sk_odata(sk);
|
||||||
set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
|
if (!test_and_set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags))
|
||||||
svc_xprt_enqueue(&svsk->sk_xprt);
|
svc_xprt_enqueue(&svsk->sk_xprt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue