From patchwork Tue May 30 15:49:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13260567 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 D1446C77B7A for ; Tue, 30 May 2023 15:50:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D2DF900004; Tue, 30 May 2023 11:50:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6838C900003; Tue, 30 May 2023 11:50:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FCF9900004; Tue, 30 May 2023 11:50:34 -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 3F997900003 for ; Tue, 30 May 2023 11:50:34 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B902E140291 for ; Tue, 30 May 2023 15:50:33 +0000 (UTC) X-FDA: 80847358746.18.648274C Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by imf19.hostedemail.com (Postfix) with ESMTP id 32BA51A0018 for ; Tue, 30 May 2023 15:50:30 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=JxMBeyY1; spf=pass (imf19.hostedemail.com: domain of "prvs=507b913ec=johannes.thumshirn@wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=507b913ec=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685461831; 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:in-reply-to:references:references:dkim-signature; bh=zkowtZ415fCQeJRiHjflZgyo08gZkymF9cFFxhT07Cs=; b=iuGfOPwK9bexBRMVbieYOm1Y959lkZXVEl1RyLfvZB+CM141Tx4GS5aMLeF7KKWRV9YKLx lXBcvrm/3CBK+MIPa39AoKDwsGozQ8xCR+fipmngGJM/1t+qZeNc1GDsa4pKGfJUuLxzSm +3vYPN5ViLTdqXJJuDt3Dbsk2EJLPjU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685461831; a=rsa-sha256; cv=none; b=s0cDw4yX247uzUFOT6Iv1nK1L13K8/Y2h4CaE4yyfGtY4CTLVn2ddCA0kD78FRvH92GKs6 swAI8/GYuANh2XYpmcZns9e4yL4XhlFCq1TFdUAgYgz3JO5IqFiMegXdyA2Kzs8QPyohTt EqeMhp6kBK1llen5PukbyyhuumxZvXo= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=JxMBeyY1; spf=pass (imf19.hostedemail.com: domain of "prvs=507b913ec=johannes.thumshirn@wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=507b913ec=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1685461831; x=1716997831; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eyPQiHOzD3W2DQRKwVAI2Cbe6Umke2Yu0VLdprV7VgA=; b=JxMBeyY1wITEn8EypTC2IG+9oDiruT3hTA2eXbWq7m6ny1Y4XfxxiSZ7 TuFvI9ZpcBQmGTQTBju4V4PQpvGTKiJMxzR2EUFbyr+Esuzpbd5LQIabc GQeYKgvZxsZskSxMJnadJtRDun4oErD7VoBnsdQ306SZD79NORVNTrXWF sAoJ4wiV6QfzkV9dV+ScScQcGZh7e2n3s+fjIm2iL7R6m4UDlxg0F3s1k nmolMe2bxIw/eXu5j25r8re+ulXzfwpn266BcLIxCyZMHC53C3ipLV/Ia FUCc9YgeF92q46cDx2KobNKdGoA+C6VFyojavgt62k+vMUGwBu1FCY/mh A==; X-IronPort-AV: E=Sophos;i="6.00,204,1681142400"; d="scan'208";a="231905804" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 May 2023 23:50:30 +0800 IronPort-SDR: unyxnGWYrTNFCzzDY+WzDpBBK4dUa2tKWyah6OdWAPvEqhJaCCZRFVmEM6M0F2fHuX+7BnTNNl q3nhCIBGmyZSuCLNDPVL+93hvw3Hkg9wFVT89H0YRcqwAIH3kf985YhAJIziuxaSSfJ6+ocyRK qeHwvjG/G15pR/zZenhjkjLVCVYshFea+ul59ZC+LetAIdJQTY5//m++eb2yZKQz7bT2KNNUuo C1HeJqk7yOadalOPNxnXkPMW36FTuTn8hGp8vb0KvwIDsDJR6d89+AoGFAlJD+LHF98A3aw3hr 2D4= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 30 May 2023 07:59:42 -0700 IronPort-SDR: bSqBFzv7rrWvPvkE4gwhOHj9e0jpcVXnuD/Kq3xELlTSi+Nq3cUl8HGoaL0rUxB1OR25AAJdei TIPhTBMTndkhO2YNy8PxBhVVLv4Kla8ZXnfIi5I7M3fxa3gTd8oOlhRXj2aVcnNgmc/rxQ3lh0 pt68H/iNv5aYOaAvAaRNX6IexlshH2MNcr7cPmRVBzj+I1Z64b2NARfsMPI8qXzvdg6WEXxV+l Bxa2dMoJnICTi4jECIHCBYec6Uvp0PaRuTsjD5YAUZHSr6x9Mm/SzMBT9zXRe7WaHmXxtQTl7o Jr8= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip02.wdc.com with ESMTP; 30 May 2023 08:50:27 -0700 From: Johannes Thumshirn To: Jens Axboe Cc: Christoph Hellwig , Hannes Reinecke , Chaitanya Kulkarni , Damien Le Moal , Ming Lei , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com, Song Liu , linux-raid@vger.kernel.org, Mike Snitzer , Matthew Wilcox , Dave Kleikamp , jfs-discussion@lists.sourceforge.net, cluster-devel@redhat.com, Bob Peterson , Andreas Gruenbacher , Mikulas Patocka , gouhao@uniontech.com, Johannes Thumshirn Subject: [PATCH v6 20/20] block: mark bio_add_folio as __must_check Date: Tue, 30 May 2023 08:49:23 -0700 Message-Id: <3d45098a7640897cbace54713efe10d88b74c160.1685461490.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Stat-Signature: yu3h3ewnin3dotx6eb5eocw4himtdtd4 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 32BA51A0018 X-Rspam-User: X-HE-Tag: 1685461830-190393 X-HE-Meta: U2FsdGVkX1/T2aGvxdw5lWkH7UV5jfF4qtyW44cjmuESmVNrtRLIvwNe+W+w7oLKJhBYlEfu9IgCE8XQyCORAQYjkop2Fj6by6YJDBSBFkhtWMZMd9YS7a1FY7BVyjegHvJqnPIj33wUktYhRwS6CdoMr5UazTWnp7YC1p85DAsKAAl/O9rp9NXqUVV/QZEzZF4l7TEUdBzFEizM/I97HeJvYjFpzkZoAle9jIRAsp8LAY1HwduprWi6PT5fBaoYfGTlLUsV4B8+ja2BcYgLMQ3eAeoAiCs189B80FyaY/4QlXHRfk9N+pAQFv6/n9ZR+Y30yeSLy32PVt8Wt4daNfuDrLhh5HAvqADTo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Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Now that all callers of bio_add_folio() check the return value, mark it as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Matthew Wilcox (Oracle) --- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index 4232a17e6b10..fef9f3085a02 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -466,7 +466,7 @@ void bio_reset(struct bio *bio, struct block_device *bdev, blk_opf_t opf); void bio_chain(struct bio *, struct bio *); int __must_check bio_add_page(struct bio *, struct page *, unsigned len, unsigned off); -bool bio_add_folio(struct bio *, struct folio *, size_t len, size_t off); +bool __must_check bio_add_folio(struct bio *, struct folio *, size_t len, size_t off); extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, unsigned int, unsigned int); int bio_add_zone_append_page(struct bio *bio, struct page *page,