Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1269935rdb; Fri, 16 Feb 2024 10:07:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXiW7e3IfB9wE50yG/GnrXoR/4OKUjLW5TWZDxQN18aHjygVM8FnZW4cd8dBpbrLyIhH+vusvrCUn6g5Tw5a3viBPreqw7yO8zOCgFFyw== X-Google-Smtp-Source: AGHT+IHdXsncirc/oehynIUDmEolF5emluyqWM+nUyy7rVH3uen0SASOzcJynGNfjrrRuJxTjcA4 X-Received: by 2002:a17:906:5799:b0:a3c:ecce:27c7 with SMTP id k25-20020a170906579900b00a3cecce27c7mr4339603ejq.42.1708106836312; Fri, 16 Feb 2024 10:07:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708106836; cv=pass; d=google.com; s=arc-20160816; b=yG6qaXOf8BM3QV0M1IA1aE4KXAwiKoWk6FPW0XPPnecKBqVDAtbrNEAc3uoB1Ojiyz uRTtc/hIag8HOPwrcjIGJ+C08d05ZjGfFZZ3jlq9icv56zGp6TqQuLl638C7vk1GzBg7 9HvZP/qd+srDDEyxj5gsntOleUxfoT6M3TGJZGxfEx72VrRLUh3D77uRaL6chBjH5pJl +AzYIdVptTGtjdABJx2xJO93HVHvKG1ccU46Qp8h9E4mluR8XGX/xeMf1I2kO6nnlYOS +Ndf6rwwiq4E5OEzfWpDEIYiZFQTQ8V0bHReLpLxIcbgYcrhDwbYV218tUBe/HaEz9tm p/zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:sender:dkim-signature; bh=RtvoN2Te8lsuMrpULW6AGCbHjbIm4X87ZQHxVBkQdBg=; fh=e0Zcnf0zLSn0Tv9ivwir6OEkJPfljHn69SOQu70nsl8=; b=wt2FFFINwohWO0o4n/+rTGDKS0AGdykflMduurGkUK0pNVkfvx2z1XDSsKQOeij5XV iVwGzheBvmYv0UBA90tQ4p0Qb4d4S1fv0hjTCtzB4MhjsLANvyGfwXd0Fmr9vKXfUSMU FojcMYXBMGAe7F1hKF5qJ29L003o2pGzIE+kRv6pmCW882cV7AznD50RCcU9jmQ0dc1J ZkljrQQt7mOUzxbWe28Wyx+7VCDeP+wHQXfqQBGXM7gigX04XXfX+5iDS3hHc/utud0I pkwo2byyX+Yc+DSFopg6/N0PxHBb1zgwMGpvgWqm6ircVBpOnYN7q34QuwcRLVZR4fOR 2WiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EhM6jn3u; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-69121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l17-20020a170906079100b00a3d8bab1e42si132388ejc.570.2024.02.16.10.07.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:07:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EhM6jn3u; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-69121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5A7D51F21CF2 for ; Fri, 16 Feb 2024 18:06:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D26D11339B8; Fri, 16 Feb 2024 18:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EhM6jn3u" Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98A341350F6 for ; Fri, 16 Feb 2024 18:06:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708106781; cv=none; b=Wn0qTxawFULeQrq7xlzj/HogsEgemBgv6ZqyXb/BioAJStfA4uuqs4g/GKmpDWtkRadI7zwXWm+bsbaiiTX9BtH6Jpwd3Bl4fPaV4luW/Y164dbq/SKf+HMTrl5/1FoXpTJzyB3H0Q/A0dZqC5WvX7wG2zl4gEp3hNBO4qOo4Ds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708106781; c=relaxed/simple; bh=dwcDbWOPxRgiZhLXY8mPYkaEIPRTLSYlPdZIIJdc+Lw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZVUZBYKKGSBlspMrK8TdqLbhkXNqr1hfOrG4tCxpvzRDOE5qfUS/3ApjYWAQIbHjXs7O5sfz9A7/oGN+TGOR9ICIx/+9DuhPSSAylQd3XN2Y/yY0OzEObFvUaW6HcarxN1/5mzQ1QrBv5XnFggH9tYRRlufJq8mSmO5fGakqM7A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EhM6jn3u; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d7881b1843so20778315ad.3 for ; Fri, 16 Feb 2024 10:06:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708106779; x=1708711579; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=RtvoN2Te8lsuMrpULW6AGCbHjbIm4X87ZQHxVBkQdBg=; b=EhM6jn3uGgGZb73vI9RkmtFYIcS+R/vLQe/gdAGCWzbu4a/iP76puwbvIGS2PitS6g Ukh1HuXnRl1O1JdYnKwXA6OA91SvJyK+t1YiykCvf6IwGSOyYbtiBHH/gWQm6CzxTOHL LAgexkt0+SN/hi5+b8fnW4ldJqDhKwbeCcq9zLx9Z1vO2M59S57R5LnUWjNFw/HtkSZi iuPin6jmDuNUoE7Cx4s5HdmBedPngMB1vQH1xenws1dDZbeqxcigOP+SiKL2h/1pJjow blwP4iY6AoWQKofqUdjZU6X4AEjmwFfaVuFltaLas2POIFxmhc0R6bMra47bNW+d6fws tQxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708106779; x=1708711579; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=RtvoN2Te8lsuMrpULW6AGCbHjbIm4X87ZQHxVBkQdBg=; b=frdW6zAniv5rNA6mnblt5O8tUHPPiJxSu8TyK7s/scYg8rg3r2rqJ6c6adKhtijgyn Vdb4/rm5jeHC1p06VItY0kFAH67orD7yKyTVzQeTb1rRMrIq4RysfJnZ4UtY+yzdmn0s vSahvRAW2/9HP0il2wYBVBN5CKg+AzepZQwkcmSiTEwhFRm03iGYYFHaSmwlgnzUTCnH b7sUadnIQDir+xVOdjJR4qi9g2zdqs3vmpYddNIkq1zICMz/TEFB5meKj1aJMi65zyDn /xrhLiNdKGHedgddVSrbkR7vPCrXjOe6PlMES8mLIRUKtgexQhKVe7hP7fBaNZHkFjh2 ZwAA== X-Forwarded-Encrypted: i=1; AJvYcCUlAvF6w3/+LE56/DLjzeJVWAuc8yb8Ekr/+nzU+f01HEb6XGEMvbAxEwLrew1yIS84Swjcta3yt4HcA4JUGt1RE8T41FGaW8cK+ciE X-Gm-Message-State: AOJu0YzhjvRP6i46olZeU9zLNs0PZgPmfcrdnM3o7f7KLq27rvqSg0zk 6hPQkwdsR+oJjGFD7tbDG1RX275vmS18GEUjVSzOZP7QlpfbUVcp X-Received: by 2002:a17:903:1106:b0:1d9:e18b:d916 with SMTP id n6-20020a170903110600b001d9e18bd916mr7103005plh.28.1708106778800; Fri, 16 Feb 2024 10:06:18 -0800 (PST) Received: from localhost (dhcp-141-239-158-86.hawaiiantel.net. [141.239.158.86]) by smtp.gmail.com with ESMTPSA id mn8-20020a1709030a4800b001d8d0487edbsm145269plb.223.2024.02.16.10.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:06:18 -0800 (PST) Sender: Tejun Heo From: Tejun Heo To: jiangshanlai@gmail.com Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, allen.lkml@gmail.com, kernel-team@meta.com, Tejun Heo Subject: [PATCH 03/17] workqueue: Rename __cancel_work_timer() to __cancel_timer_sync() Date: Fri, 16 Feb 2024 08:04:44 -1000 Message-ID: <20240216180559.208276-4-tj@kernel.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240216180559.208276-1-tj@kernel.org> References: <20240216180559.208276-1-tj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit __cancel_work_timer() is used to implement cancel_work_sync() and cancel_delayed_work_sync(), similarly to how __cancel_work() is used to implement cancel_work() and cancel_delayed_work(). ie. The _timer part of the name is a complete misnomer. The difference from __cancel_work() is the fact that it syncs against work item execution not whether it handles timers or not. Let's rename it to less confusing __cancel_work_sync(). No functional change. Signed-off-by: Tejun Heo --- kernel/workqueue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 87750e70b638..7e2af79bfa62 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -4075,7 +4075,7 @@ static int cwt_wakefn(wait_queue_entry_t *wait, unsigned mode, int sync, void *k return autoremove_wake_function(wait, mode, sync, key); } -static bool __cancel_work_timer(struct work_struct *work, bool is_dwork) +static bool __cancel_work_sync(struct work_struct *work, bool is_dwork) { static DECLARE_WAIT_QUEUE_HEAD(cancel_waitq); unsigned long flags; @@ -4159,7 +4159,7 @@ static bool __cancel_work_timer(struct work_struct *work, bool is_dwork) */ bool cancel_work_sync(struct work_struct *work) { - return __cancel_work_timer(work, false); + return __cancel_work_sync(work, false); } EXPORT_SYMBOL_GPL(cancel_work_sync); @@ -4264,7 +4264,7 @@ EXPORT_SYMBOL(cancel_delayed_work); */ bool cancel_delayed_work_sync(struct delayed_work *dwork) { - return __cancel_work_timer(&dwork->work, true); + return __cancel_work_sync(&dwork->work, true); } EXPORT_SYMBOL(cancel_delayed_work_sync); -- 2.43.2