From f6aa7a46d36b38d52692ce4af9b73c5561c66691 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Wed, 8 Jul 2020 08:14:21 +1000 Subject: [PATCH] LU-6142 lustre: use init_wait(), not init_waitqueue_entry() 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 Change-Id: I621364d8f6b155df3f2159dfca39f252abc81c76 Reviewed-on: https://review.whamcloud.com/39300 Reviewed-by: Shaun Tancheff Tested-by: jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- libcfs/libcfs/tracefile.c | 2 +- lustre/fid/fid_request.c | 6 +++--- lustre/obdclass/upcall_cache.c | 2 +- lustre/ptlrpc/gss/gss_svc_upcall.c | 2 +- lustre/ptlrpc/sec_bulk.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libcfs/libcfs/tracefile.c b/libcfs/libcfs/tracefile.c index 09b1c13..8cca867 100644 --- a/libcfs/libcfs/tracefile.c +++ b/libcfs/libcfs/tracefile.c @@ -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); diff --git a/lustre/fid/fid_request.c b/lustre/fid/fid_request.c index 13c3452..a951964 100644 --- a/lustre/fid/fid_request.c +++ b/lustre/fid/fid_request.c @@ -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) { diff --git a/lustre/obdclass/upcall_cache.c b/lustre/obdclass/upcall_cache.c index 5622410..9624c0a 100644 --- a/lustre/obdclass/upcall_cache.c +++ b/lustre/obdclass/upcall_cache.c @@ -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); diff --git a/lustre/ptlrpc/gss/gss_svc_upcall.c b/lustre/ptlrpc/gss/gss_svc_upcall.c index 8a2e1de..04c0a8c 100644 --- a/lustre/ptlrpc/gss/gss_svc_upcall.c +++ b/lustre/ptlrpc/gss/gss_svc_upcall.c @@ -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: diff --git a/lustre/ptlrpc/sec_bulk.c b/lustre/ptlrpc/sec_bulk.c index 870f76a..2928637 100644 --- a/lustre/ptlrpc/sec_bulk.c +++ b/lustre/ptlrpc/sec_bulk.c @@ -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); -- 1.8.3.1