Whamcloud - gitweb
LU-6142 lustre: use init_wait(), not init_waitqueue_entry() 00/39300/2
authorMr NeilBrown <neilb@suse.de>
Tue, 7 Jul 2020 22:14:21 +0000 (08:14 +1000)
committerOleg Drokin <green@whamcloud.com>
Thu, 13 Aug 2020 06:00:17 +0000 (06:00 +0000)
init_waitqueue_entry(foo, current)

is equivalent to

    init_wait(foo)

So use the shorter version - in lustre and libcfs.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I621364d8f6b155df3f2159dfca39f252abc81c76
Reviewed-on: https://review.whamcloud.com/39300
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/tracefile.c
lustre/fid/fid_request.c
lustre/obdclass/upcall_cache.c
lustre/ptlrpc/gss/gss_svc_upcall.c
lustre/ptlrpc/sec_bulk.c

index 09b1c13..8cca867 100644 (file)
@@ -1166,7 +1166,7 @@ end_loop:
                                break;
                        }
                }
-               init_waitqueue_entry(&__wait, current);
+               init_wait(&__wait);
                add_wait_queue(&tctl->tctl_waitq, &__wait);
                schedule_timeout_interruptible(cfs_time_seconds(1));
                remove_wait_queue(&tctl->tctl_waitq, &__wait);
index 13c3452..a951964 100644 (file)
@@ -323,7 +323,7 @@ int seq_client_get_seq(const struct lu_env *env,
        LASSERT(seqnr != NULL);
 
        mutex_lock(&seq->lcs_mutex);
-       init_waitqueue_entry(&link, current);
+       init_wait(&link);
 
        /* To guarantee that we can get a whole non-used sequence. */
        while (seq_fid_alloc_prep(seq, &link) != 0)
@@ -362,7 +362,7 @@ int seq_client_alloc_fid(const struct lu_env *env,
        LASSERT(seq != NULL);
        LASSERT(fid != NULL);
 
-       init_waitqueue_entry(&link, current);
+       init_wait(&link);
        mutex_lock(&seq->lcs_mutex);
 
        if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_EXHAUST))
@@ -421,7 +421,7 @@ void seq_client_flush(struct lu_client_seq *seq)
        wait_queue_entry_t link;
 
        LASSERT(seq != NULL);
-       init_waitqueue_entry(&link, current);
+       init_wait(&link);
        mutex_lock(&seq->lcs_mutex);
 
        while (seq->lcs_update) {
index 5622410..9624c0a 100644 (file)
@@ -217,7 +217,7 @@ find_again:
                              MAX_SCHEDULE_TIMEOUT;
                long left;
 
-               init_waitqueue_entry(&wait, current);
+               init_wait(&wait);
                add_wait_queue(&entry->ue_waitq, &wait);
                set_current_state(TASK_INTERRUPTIBLE);
                spin_unlock(&cache->uc_lock);
index 8a2e1de..04c0a8c 100644 (file)
@@ -886,7 +886,7 @@ int gss_svc_upcall_handle_init(struct ptlrpc_request *req,
 
        cache_get(&rsip->h); /* take an extra ref */
        init_waitqueue_head(&rsip->waitq);
-       init_waitqueue_entry(&wait, current);
+       init_wait(&wait);
        add_wait_queue(&rsip->waitq, &wait);
 
 cache_check:
index 870f76a..2928637 100644 (file)
@@ -581,7 +581,7 @@ again:
                                                        page_pools.epp_waitqlen;
 
                                set_current_state(TASK_UNINTERRUPTIBLE);
-                               init_waitqueue_entry(&waitlink, current);
+                               init_wait(&waitlink);
                                add_wait_queue(&page_pools.epp_waitq,
                                               &waitlink);