summaryrefslogtreecommitdiff
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2023-09-11 17:38:45 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-10-16 19:44:03 +0300
commit7b31f4daebad296e3164602b8303c265ec4ac7dc (patch)
tree1e655f32b6c098c5fd96b66e4ee09a04fc3fd00a /net/sunrpc/svc.c
parente3274026e2ec69eec6ab51bc499e14bb548548d0 (diff)
downloadlinux-7b31f4daebad296e3164602b8303c265ec4ac7dc.tar.xz
SUNRPC: rename and refactor svc_get_next_xprt()
svc_get_next_xprt() does a lot more than just get an xprt. It also decides if it needs to sleep, depending not only on the availability of xprts but also on the need to exit or handle external work. So rename it to svc_rqst_wait_for_work() and only do the testing and waiting. Move all the waiting-related code out of svc_recv() into the new svc_rqst_wait_for_work(). Move the dequeueing code out of svc_get_next_xprt() into svc_recv(). Previously svc_xprt_dequeue() would be called twice, once before waiting and possibly once after. Now instead rqst_should_sleep() is called twice. Once to decide if waiting is needed, and once to check against after setting the task state do see if we might have missed a wakeup. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/svc.c')
0 files changed, 0 insertions, 0 deletions