linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: Julian Wiedmann <jwi@linux.ibm.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH wq/for-next 1/2] workqueue: replace open-coded work_pending()
Date: Wed,  2 Jun 2021 13:16:54 +0200	[thread overview]
Message-ID: <20210602111655.3808580-1-jwi@linux.ibm.com> (raw)

Use the right helper to check whether a work item is currently pending.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 50142fc08902..8a700ccfa313 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3209,7 +3209,7 @@ EXPORT_SYMBOL(flush_delayed_work);
  */
 bool flush_rcu_work(struct rcu_work *rwork)
 {
-	if (test_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&rwork->work))) {
+	if (work_pending(&rwork->work)) {
 		rcu_barrier();
 		flush_work(&rwork->work);
 		return true;
-- 
2.25.1


             reply	other threads:[~2021-06-02 11:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 11:16 Julian Wiedmann [this message]
2021-06-02 11:16 ` [PATCH wq/for-next 2/2] workqueue: clean up for_each_pwq()'s documentation Julian Wiedmann
2021-06-04 14:53   ` Tejun Heo
2021-06-03  2:20 ` [PATCH wq/for-next 1/2] workqueue: replace open-coded work_pending() Lai Jiangshan
2021-06-04 14:53 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210602111655.3808580-1-jwi@linux.ibm.com \
    --to=jwi@linux.ibm.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --subject='Re: [PATCH wq/for-next 1/2] workqueue: replace open-coded work_pending()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox