From patchwork Fri Aug 2 09:19:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Long X-Patchwork-Id: 13751305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 588B4C3DA4A for ; Fri, 2 Aug 2024 09:20:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB8086B007B; Fri, 2 Aug 2024 05:20:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A3F996B0083; Fri, 2 Aug 2024 05:20:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E0386B0085; Fri, 2 Aug 2024 05:20:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6F1566B007B for ; Fri, 2 Aug 2024 05:20:31 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 15A10410EF for ; Fri, 2 Aug 2024 09:20:31 +0000 (UTC) X-FDA: 82406759862.27.F4A52DF Received: from smtpbgeu1.qq.com (smtpbgeu1.qq.com [52.59.177.22]) by imf30.hostedemail.com (Postfix) with ESMTP id C463380012 for ; Fri, 2 Aug 2024 09:20:26 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=none; spf=none (imf30.hostedemail.com: domain of w@laoqinren.net has no SPF policy when checking 52.59.177.22) smtp.mailfrom=w@laoqinren.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722590423; a=rsa-sha256; cv=none; b=Bz/YTkPblD/kmrhY4y2VcrCZbAyiCumhVW7acu2uLPXtoXbVa//+dlDizKviX/iN+Ewo32 aRrvPVNktFFqaeoRjazAKR6s7IN/3AqlaSLw3lsBgrBtNUrcWEoi9WoUzoiWaArcaVSTCx +ePIVjvV4/7Q3fYZ/J5Uh9TlaWlX4i8= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=none; spf=none (imf30.hostedemail.com: domain of w@laoqinren.net has no SPF policy when checking 52.59.177.22) smtp.mailfrom=w@laoqinren.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722590423; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=fdT87NndLbqccJN8wCTMWvu/ZzYQRnafgO7acGOW1+k=; b=lLhD3wSjWwYQJsr+2ZPJUlprOC3haousZhs7i5XR/O5fGLtHok/g6PMmwEel/9jBDLcHpd j5/IEe18OrqeeugCH49o0ULJOYif43OrjigcAfFq37cUdgWZV6EMQUfoTrRd9hZVHFV7UK 9aRhbph4QSauFFOF30/OB2m/BWM1OF0= X-QQ-mid: bizesmtpsz11t1722590369tysorc X-QQ-Originating-IP: pPNwhlYaIQO+30V/hlDGbUY7D9eliME6KMTXrd/P93M= Received: from localhost.localdomain.info ( [103.37.140.45]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 02 Aug 2024 17:19:16 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 16223661223895339579 From: Wang Long To: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, tj@kernel.org, cl@linux.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Wang Long Subject: [PATCH] percpu-rwsem: remove the unused parameter 'read' Date: Fri, 2 Aug 2024 17:19:01 +0800 Message-Id: <20240802091901.2546797-1-w@laoqinren.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpsz:laoqinren.net:qybglogicsvrsz:qybglogicsvrsz4a-1 X-Rspam-User: X-Rspamd-Queue-Id: C463380012 X-Rspamd-Server: rspam01 X-Stat-Signature: 4wyb1yp4rc65zn6znyzcq5zbwjgysro9 X-HE-Tag: 1722590426-362310 X-HE-Meta: U2FsdGVkX1/mpRf6/1U+8bhU37fuJ9/ffY0LiXqbhNNHwTarVbVypnbMLKh3wgZsgzwVsResFdKVD5mVBwSpn8ihpWWWizGa73BHYaKcRbn9guFO3jfv4sgit7Ab+I6xWkmDwmbqYDSScA+0bpXzd3X/PtjSk/ddhNjONbZ+EtaAaXy7+ChnC9OBY6W5qtqKT7L3ZlELB45ZDiaRqi2ryz1qmeXMFnBJJFgommOIL8b0QrEQIZIyFgElmJiyhH4A8xRsRP4ryp+attKOMIEl7bbiZgwmNmApheToF5HEiHEZ62+U9LLQnUn3s7VS92KXt2tXNbRar7gBJ+RBMz05zrUMGvKQSwzeyCXbB2xTQpX+mFdniRpjc114HIT4Q8hTx8VajUarnAZvmfqdYfZ4WYumaHg6BvWvqn/m741duEYFjUUuiJUH/KB0L2oVYH7/pvjyh/aWat9jjs7IA2QCh95b5FENVkCmx7SJHMCOImn6UpmZjqWFU/TynbCm6DNvz7GNYOVUXHKIXca3GjsVDoeFc2h6TbvjpAfMqvivH41fLjrLD9iUq8uHR4f3yvfY9FSAR/Sb+HvBnblzsBmzB0dZtIqnrA9fefTQvQqpxD6la+BTCwHrZi80v2uK0o5vUY2jNo3SVlcV2mbXJO2+ZwM0f+fyJjySWAM8p9Bm/KF5biMCZ4MvWo4EjvUtnZZM7+moDWuJWE/ALeYMtl+iJLEuQ3izy6Sp4OaqTS955xcP2aicv2ASRxoB7K38/w/G16++mKor8dmUL/km7hHgicol0QcQuZ5N2Jvp1O0gUF0w19MSmUiKtRZ0hctQlmuvINZaKSvZtK7tjsvQeCOLkQbgCxiuaTEKWZr9YpJu9In/bqZcSapR5js2vr/xgVdYrWaMhTWieuhFwCEEhj4BrMER7K0Sa2JnVXqhNtdH0VaoX1QJqRfIB/lgvZhCwPWbhu0gSE5jQiX/Zh6WZDn /0CCh0ln dbtH3B88UmEhtBiRTakDFOiy9+mKmYgS6cs8ndKIefH+v3/M6eIYZYQuc848T7HAfNCUSyTFYC7J6q+0BoMnu8xDC/Dacow6mRglusfvZnf5hI0avwnbHIuAbjA/BnsGeyKK712vTHTfqiPfEILtTYDE5pxYonnStBBpySc5miktreV3ixbpOZP6f93SdbWLSI7Nk X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: In the function percpu_rwsem_release, the parameter `read` is unused, so remove it. Signed-off-by: Wang Long Reviewed-by: Jan Kara --- fs/super.c | 2 +- include/linux/fs.h | 2 +- include/linux/percpu-rwsem.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/super.c b/fs/super.c index 38d72a3cf6fc..216c0d2b7927 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1905,7 +1905,7 @@ static void lockdep_sb_freeze_release(struct super_block *sb) int level; for (level = SB_FREEZE_LEVELS - 1; level >= 0; level--) - percpu_rwsem_release(sb->s_writers.rw_sem + level, 0, _THIS_IP_); + percpu_rwsem_release(sb->s_writers.rw_sem + level, _THIS_IP_); } /* diff --git a/include/linux/fs.h b/include/linux/fs.h index fd34b5755c0b..d63809e7ea54 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1683,7 +1683,7 @@ static inline bool __sb_start_write_trylock(struct super_block *sb, int level) #define __sb_writers_acquired(sb, lev) \ percpu_rwsem_acquire(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_) #define __sb_writers_release(sb, lev) \ - percpu_rwsem_release(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_) + percpu_rwsem_release(&(sb)->s_writers.rw_sem[(lev)-1], _THIS_IP_) /** * __sb_write_started - check if sb freeze level is held diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h index 36b942b67b7d..c012df33a9f0 100644 --- a/include/linux/percpu-rwsem.h +++ b/include/linux/percpu-rwsem.h @@ -145,7 +145,7 @@ extern void percpu_free_rwsem(struct percpu_rw_semaphore *); #define percpu_rwsem_assert_held(sem) lockdep_assert_held(sem) static inline void percpu_rwsem_release(struct percpu_rw_semaphore *sem, - bool read, unsigned long ip) + unsigned long ip) { lock_release(&sem->dep_map, ip); }