summaryrefslogtreecommitdiff
path: root/drivers/Makefile
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2023-07-31 09:48:28 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-08-30 00:45:22 +0300
commit6859d1f2902c600f6b1c587c91408a91e05cdc02 (patch)
treee2930bdc74c22147444e9bcf843f3ac9e375398e /drivers/Makefile
parentd2f0ef1cbf37e396ef9c57a30c004ebe65cdbca9 (diff)
downloadlinux-6859d1f2902c600f6b1c587c91408a91e05cdc02.tar.xz
SUNRPC: make rqst_should_sleep() idempotent()
Based on its name you would think that rqst_should_sleep() would be read-only, not changing anything. But in fact it will clear SP_TASK_PENDING if that was set. This is surprising, and it blurs the line between "check for work to do" and "dequeue work to do". So change the "test_and_clear" to simple "test" and clear the bit once the thread has decided to wake up and return to the caller. With this, it makes sense to *always* set SP_TASK_PENDING when asked, rather than to set it only if no thread could be woken up. [ cel: Previously TASK_PENDING indicated there is work waiting but no idle threads were found to pick up that work. After this patch, it acts as an XPT_BUSY flag for wake-ups that have no associated xprt. ] Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'drivers/Makefile')
0 files changed, 0 insertions, 0 deletions