From patchwork Thu Apr 20 10:04:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13218308 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 5C697C77B78 for ; Thu, 20 Apr 2023 10:06:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 973A590000B; Thu, 20 Apr 2023 06:06:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8FF49900002; Thu, 20 Apr 2023 06:06:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 68C6590000B; Thu, 20 Apr 2023 06:06:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 58512900002 for ; Thu, 20 Apr 2023 06:06:16 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2F1EB4013B for ; Thu, 20 Apr 2023 10:06:16 +0000 (UTC) X-FDA: 80701339152.23.CAC2369 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by imf07.hostedemail.com (Postfix) with ESMTP id 5C3714001C for ; Thu, 20 Apr 2023 10:06:14 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf07.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=morbidrsa@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681985174; 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; bh=ExnlLXqiP3hLS8bpFiqaYIxJLAKQF5DCX5VPxtSPsPo=; b=a4FwY333VVuJgAP1VZCaF5zqKZniTpL5I+wQ+KIh08iEoLBkxLhMdjsLHAk4yj2j0k/lHs FanypWw4Q6U9f4/q2ZF0kQ0kcmTBCx+OfIjJmko2cR3+Rj0R27OcIwH8GV4WEvtDEFpqJW KpbLraqiGEwAecw7xA+kAVEa27rkZOc= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf07.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=morbidrsa@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681985174; a=rsa-sha256; cv=none; b=QBR1RFQ+YeKriO1OhaTITQKAEVSVAAtyqB6LOHQoMwnIj2tP2rZTZu5lNQMT4f+JcxVJ80 KJfglEHaxqYnQZIEkyBAtrQD9cgR3xip8wBsMnfW3rozvWVNJsdjuSqeg6ndN/fwo4p05a 9CeABKWBwSiWTPS1srNqeTO72CooZyk= Received: by mail-wm1-f52.google.com with SMTP id he11-20020a05600c540b00b003ef6d684102so2781073wmb.3 for ; Thu, 20 Apr 2023 03:06:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681985173; x=1684577173; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ExnlLXqiP3hLS8bpFiqaYIxJLAKQF5DCX5VPxtSPsPo=; b=M5Xwo7xPORSCMMzhfg8oqzYJdciLzq8r8R0gf25zBF5R6z8s/pEo+7QHw34JrK3sPF YO731hBTQgY+j9TwXAHunklJ426nDq8uFSrGXS6oIuqRSQPdzgWVMn2CPSWZGsCUKIBD epF1StH8gV0DpqItFge4caSMD3oR8xI99E5meEWpKylD6KrCSEVz5KfIvvvZWsISyCcE e1p0ay/NR+bX6E4lwEAaifM3ehRYBVSCaVG+ETeN4YJ6aLDWMS1XqweTFX6V+74L6eDQ CGxIN1r5ApuTczpvJab7F6ujVn0lvbSiJjsooH2cQMpTSEUpTqAe7DDGAmrfDiDIp4MR qKkg== X-Gm-Message-State: AAQBX9f1MfAgldXV1N3lilI7XAtnpSKCHqhQpt2IKYwl03I2TZF3Fwws PyHzC75wqK7Hf3QGa2quvNg= X-Google-Smtp-Source: AKy350Y9Lh9XIY3qybGhOCpyPMv4/qCxT9O5teS3GZxkrMtKC5XpeBENII5mka0Be7VFkgyszAIoCQ== X-Received: by 2002:a7b:c4c6:0:b0:3f1:7006:e782 with SMTP id g6-20020a7bc4c6000000b003f17006e782mr804698wmk.25.1681985173032; Thu, 20 Apr 2023 03:06:13 -0700 (PDT) Received: from localhost.localdomain (aftr-62-216-205-208.dynamic.mnet-online.de. [62.216.205.208]) by smtp.googlemail.com with ESMTPSA id l11-20020a5d674b000000b0030276f42f08sm201410wrw.88.2023.04.20.03.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 03:06:12 -0700 (PDT) From: Johannes Thumshirn To: axboe@kernel.dk Cc: johannes.thumshirn@wdc.com, agruenba@redhat.com, cluster-devel@redhat.com, damien.lemoal@wdc.com, dm-devel@redhat.com, dsterba@suse.com, hare@suse.de, hch@lst.de, jfs-discussion@lists.sourceforge.net, kch@nvidia.com, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-raid@vger.kernel.org, ming.lei@redhat.com, rpeterso@redhat.com, shaggy@kernel.org, snitzer@kernel.org, song@kernel.org, willy@infradead.org, Damien Le Moal Subject: [PATCH v4 19/22] block: mark bio_add_page as __must_check Date: Thu, 20 Apr 2023 12:04:58 +0200 Message-Id: <20230420100501.32981-20-jth@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230420100501.32981-1-jth@kernel.org> References: <20230420100501.32981-1-jth@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 5C3714001C X-Stat-Signature: fyb1yga3mt77qpn8655tbc4gs8tpnq59 X-HE-Tag: 1681985174-815256 X-HE-Meta: U2FsdGVkX19p1ExWO7MisvddiXKmPNPOc0SxieF5QVMfc/86o7LZ1QXGgsRemdsw91H+7BvajihO46GfsG8ecU/aCuYRb/PrqiCGkqH/Z5pxuUvSYiPz2xUfxAauS5LfH9VELtP5K0KWj0Rfb5Pm18qZNCo7ELPnbrpst1OaKVNnfzEhilM248IEL7cEpJvyhLsudmoIDXn7l6ftDMn9JzOqAmIJglLDS69PA/BCu8ByKhhBltfmob62jUl8UUxXwoSIqity/OfTPK7mchtggsSJ4hc2X1pf26XiTM1lNID8TVUE5zfhewxxX4RXnc6Gij0Q4w0107r/Mchnut6dc1EWSMx9K4o4n0R/nGan39DSpu9oh2iMwb3Zd5/TTwalYChdHfXK6oXEGIwaelFSY5tqQt7TScNFlrLhPnMC32eXob3KTP0s7bMjFjukNtIHxRNcB5YvBY7189NjEkC6B/LDqfmHpmXqZLrhR8biJh4xVPb2diWT+9Lc6x8zuYiC89Yei83S9eN91OOqSsxTGWGn/+bEFah5Xw8dDHihDzvDLhvJZPkSdb7itW/Jp3AztX1bHxUevlBzY9+jVok2C7rH+6Aa/Gz5syS8QdW/jjuAiyAtR2Py+Bv6O2lpptwVayJsU2MCCXQ8ruFBKlBm9brFvPKNNlzjDIjf/o3dkIF2KKXUNqyxp2qtBSViPWXRBGZDMXpF9SUoa6PXPbo4XIYtuhoTe4s6W8NbA3aTK0T3+N66kjCFwd9C8EB7crLrEM2UjtSArPvpALZENEZAQkkKebKZ/Yei1PAY04+WIZaGIqWnLEsbDiQkjz/WUy4KVzMwIJNrz/FJMItF3zgkqOC4roaJ9HGj+cXXuvM+JtqpK0uW6a7ZcDuZId67+bZbRQDGxDPsgLSwo8GM7WircoMvXJQo9qt+wE+p8XuQAkbGkSkrT6XQo3h+NpCXFjNWXo94zmZlvJ8HLAcfQkq WqgnUd5i mt8NnUqH75QVaitRfOxj/7BOUvxarHbeJt9iinyP7g8pa4kP9w7Uw3O4pBK2H3BMsavqL/1SIMDQkiZxtbaCpd8yudroEoo5oiZ75J8vrKpVv1rEzCob/4BpCikN5zQMGdQUtBL3JMjtG+AcsVI2phh7RXR6hn47J0TKWqyfYucrQ1xrcMpTBVG7KuXO3/YJgZ2+fZF119GHfbxN92pKe1l+4vf4kH1i2I0BjAgyw3I9VZYDxMvhTn1rNLXenQ/ZHMlM2/2mQqqlAP8qLduugSVWLnV+yitFaV+NZP5sxT7cK6ZYME2qH+PqAkOIAEyN0RDtwp6foW3S8flUZB5cAF4KIsreDyX87LCBvylJ4P39xEqBT+tXLH+6GasQ+Tr+MDQldXbXsaGxOhg/jBQiPz1huUYwvVMOmW0MbCcqzqnU+gC/hgjosRgWesPLr3DhzATH1hoPDvoQGQYIcHap2oNV5lQhlXwXW1PZNGOPFBDy33PPhFKqOUSFYMC6Uq+Ownxn9lergwXGKJ53qRGigf/p8gcfroYChkkHDt4rFvpRq8pQtcMZEFwIW1rEuMCL0wLnNohZlYJbZJ8wFkSE5E4O3klPSM5rPG1o2xqBuQpzdEnlPZTeyzvkIw+/VgoMvhcdRfXlAkqhQjMdMQCxnKa0lmtXwQFPuRdVYl51wDTMfnrZ4Su4mH3/Cv2CZwULF4v4zCbJ9ceZ8ji91jlFkA3aeMze9iVD8dCfJ7badO9KCskiCXDsWQOQIxt8zzW9QIUoR 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: From: Johannes Thumshirn Now that all users of bio_add_page check for the return value, mark bio_add_page as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal --- 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 d766be7152e1..0f8a8d7a6384 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -465,7 +465,7 @@ extern void bio_uninit(struct bio *); void bio_reset(struct bio *bio, struct block_device *bdev, blk_opf_t opf); void bio_chain(struct bio *, struct bio *); -int bio_add_page(struct bio *, struct page *, unsigned len, unsigned off); +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); extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, unsigned int, unsigned int);