SUNRPC: rename some functions from rqst_ to svc_thread_
authorNeilBrown <neilb@suse.de>
Mon, 11 Sep 2023 14:39:50 +0000 (10:39 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Oct 2023 16:44:06 +0000 (12:44 -0400)
Functions which directly manipulate a 'struct rqst', such as
svc_rqst_alloc() or svc_rqst_release_pages(), can reasonably
have "rqst" in there name.
However functions that act on the running thread, such as
XX_should_sleep() or XX_wait_for_work() should seem more
natural with a "svc_thread_" prefix.

So make those changes.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/svc_xprt.c

index 17c43bde35c90297b2e834ab50ce8f6e8c316ccd..1b300a7889ebcfdb2c59e0468245582763f36cfb 100644 (file)
@@ -699,7 +699,7 @@ static bool svc_alloc_arg(struct svc_rqst *rqstp)
 }
 
 static bool
-rqst_should_sleep(struct svc_rqst *rqstp)
+svc_thread_should_sleep(struct svc_rqst *rqstp)
 {
        struct svc_pool         *pool = rqstp->rq_pool;
 
@@ -725,15 +725,15 @@ rqst_should_sleep(struct svc_rqst *rqstp)
        return true;
 }
 
-static void svc_rqst_wait_for_work(struct svc_rqst *rqstp)
+static void svc_thread_wait_for_work(struct svc_rqst *rqstp)
 {
        struct svc_pool *pool = rqstp->rq_pool;
 
-       if (rqst_should_sleep(rqstp)) {
+       if (svc_thread_should_sleep(rqstp)) {
                set_current_state(TASK_IDLE | TASK_FREEZABLE);
                llist_add(&rqstp->rq_idle, &pool->sp_idle_threads);
 
-               if (unlikely(!rqst_should_sleep(rqstp)))
+               if (unlikely(!svc_thread_should_sleep(rqstp)))
                        /* Work just became available.  This thread cannot simply
                         * choose not to sleep as it *must* wait until removed.
                         * So wake the first waiter - whether it is this
@@ -850,7 +850,7 @@ void svc_recv(struct svc_rqst *rqstp)
        if (!svc_alloc_arg(rqstp))
                return;
 
-       svc_rqst_wait_for_work(rqstp);
+       svc_thread_wait_for_work(rqstp);
 
        clear_bit(SP_TASK_PENDING, &pool->sp_flags);