提交 4720b070 编写于 作者: T Trond Myklebust 提交者: J. Bruce Fields

SUNRPC: Micro optimisation for svc_data_ready

Don't call svc_xprt_enqueue() if the XPT_DATA flag is already set.
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 fa9251af
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册