From patchwork Wed Apr 19 14:09:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13216889 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 401BBC77B7F for ; Wed, 19 Apr 2023 14:11:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 20D8B900011; Wed, 19 Apr 2023 10:11:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 083DA900007; Wed, 19 Apr 2023 10:11:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5859900011; Wed, 19 Apr 2023 10:11:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B286D900007 for ; Wed, 19 Apr 2023 10:11:03 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5C410A02ED for ; Wed, 19 Apr 2023 14:11:03 +0000 (UTC) X-FDA: 80698327206.17.59500CA Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by imf19.hostedemail.com (Postfix) with ESMTP id 6F47D1A001C for ; Wed, 19 Apr 2023 14:11:01 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=morbidrsa@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681913461; a=rsa-sha256; cv=none; b=o5wr6U/Z7Q5Vi6FNMWnfdOHQTKf/X6R4yBrcAqQp14+08MjbZteDhd5l2CXesOzobK6Kcj Vd8sayALxYFvVeT21ubW5B4XftB8e8r5pOFXnFIu7WviC+5Sk07R00/OFJp4cojgpsF3rq b7cTdMOSN7OKZd17aLh8Moq2srwtFQI= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=morbidrsa@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681913461; 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=pkyuR3n/cyAOLcSl0r3ppQzVHmYtNk950cm6kjABL5SifolXSHKA6z0+BPhS0JcvO670Fa mQ8o4dXeS6EnnbnkGSBFttdPbFbjfZn6ASIg3s+ic8nYAR/7F8shGT+s8OuA5tFJkgt99S KAfQQir8Utt5fe5AHv/4ciUvoVfs2K0= Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-3f17b967bfbso33329185e9.1 for ; Wed, 19 Apr 2023 07:11:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681913460; x=1684505460; 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=f5IchQJwtDyK4Ob9oDgBSnv/yuOTNaWLdHPFIXW98CTlvddUbIJGqraDRBZJ+lM8Xx 1QoQQXI4ATFYi+hotajwnrNFJnTDS3ptl2XB7m+tUdrNE2wF7/wMZYAI+V36bwA1CZqu dAxGX1/8D1P0ySE3MenntUdPw99i/oARI7DD/NEyYMB7YqjOJlk5ZHctQdzayUKj7TVI jWUC7nyjx+9xqMpOsgozRxlodiKSMVi6Biebr2fr92vNRARVzvKlYOBWk0fSupiVe2F6 qpO1ysaGNABhzX+/gyRB2yWhXmAmnBeIX+8sAbQqgzckGLtl2Ey9GO8QDn4qpxgyqtVd UHZA== X-Gm-Message-State: AAQBX9eZnNWG8Hus/bC/KpVQXmBvx4bbs84ucTEvFKMNekeV23uuRPtF Gv7GImuafe8Rh8nY/E0hNb8= X-Google-Smtp-Source: AKy350a8brYKmUYvrzlJUafn/qJwxJEsZNYSYhzDz8VqjHAs/A8j+oRFG+qGVgXdrE5NcZ5HHKx+1Q== X-Received: by 2002:adf:f111:0:b0:2fa:2f1e:c1a8 with SMTP id r17-20020adff111000000b002fa2f1ec1a8mr2109123wro.3.1681913460203; Wed, 19 Apr 2023 07:11:00 -0700 (PDT) Received: from localhost.localdomain (aftr-62-216-205-204.dynamic.mnet-online.de. [62.216.205.204]) by smtp.googlemail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm7612089wrv.58.2023.04.19.07.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 07:10:59 -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 v3 19/19] block: mark bio_add_page as __must_check Date: Wed, 19 Apr 2023 16:09:29 +0200 Message-Id: <20230419140929.5924-20-jth@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230419140929.5924-1-jth@kernel.org> References: <20230419140929.5924-1-jth@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 6F47D1A001C X-Rspamd-Server: rspam01 X-Stat-Signature: 4robdudtq4dw7554mji7um418ttopyz8 X-HE-Tag: 1681913461-600629 X-HE-Meta: U2FsdGVkX1/h5NvcqssmxKyyMudQ9FntuaTZb8Grwjsm9ItREELiD4RzFtQw3Cnl4jNwrsNHQgNvQphhzDEEZFROLrB6IBYjSeVLfArWi8tGh0GXPl37KkRWXGreDiLjlwL4sd0jpGJzhja+YMwLS4J5QGNCzq6unV6pP5i0hLTyavUgEpEpx0UurzeR1FJ0AylrYmBBwRIv3xCV224dBoGR8NBV90vt2rfGXCR9vbCHW2GLYYVFhFkBZ67Ptnwm9u/sRiDOxIy4d7plFaV39HsP0W/JgyIiYREcK5EsMjxnwjXifL/qw+O1Hsb0x/4jetqHK41blhY+WilDsPYs+KoWI3qdaOnqvAJRGC0+as8yLk6T08NoQoTZeRtCTL4iQy2GNGvLmgL1jJbZPSnqs2I3KHIGTDt4DUJru7OpHhTabKN68w7PxyFbUqPcTqhRDGHSF0gntrDueR1wXpNr4ZsR2BFvA1nj1zJ0DQFGsNOTY9ICt64O/RE4ZuA/0GhjShSlDRo71kL/fclaXoALH1u4Thp8/LK81Dfs9niCnMkNmMzbQvHa5CMsDDozZDoywhKjoOmEenUiENE7OSM6Tw6Xvrmy6fhR34dHjVLDPgsJWsgVN5vwOeZpUMLgOtauM+vIxZAmhuTNGpHhqWvFom4YhkSL3AWZTElwJD705bQzVu2vy8DYIO6RsBpeJ1V9fW+RbKGTy5cUvZkJLf1zu7RT6eNXrBdQ/MWzeIpLqTNFIJTxt7kwJAY+F/eoPmJSvulIrmK1V7dszjfZDqVeU+kiOt4OXw1p2cZeKKJ+3QoNgAkzf7TJOKX7UhP0mdTUJu4OsV1EVbdIYjXjD/i94Xv+1AzfnS8CCr/mj/e6lwpIUqArnnUyE/Y9GdFOs3y4xKFQB7divT1F1W785eVMecgLXUBKEWMiyiOtqwGEqpV5IEixDbARpzVHLuVaiIS5xlIjUfT9jxBrKJlSavy xuRkRXnN SycAXoWxk1PZDECN8/72ycGKId5IPyiFQ0SjszY+DitRK+akdgnaldUPDAu2a4kxQjl5z77DKmGMrhDSKlfdHfUGmkrnMQ2+pixsvdCdAWnjpzqZ7DD/HVuVq8qZIC+LgWo4OYimIsWJfRt4lDdeLrY98hhF7yvfvAyyWQu8m4kpbthQNFRUuss8kajPg13ewPgfBDdzg5ksF3gVt8b5Kzfd5yVh4k5Kf+prq0PMEe/10HgPL8uLyeG16rjdU3di1TWyFhhC5o8rgQGFb4EohU0IJgXLQcM//ke3cY8bafXFgEI7tpn1MqRMKs4p84HvXLvrp2GZwe2VuRgxG4sf2U6NYoTxv/zwlAl0ZXI6OBazwXkAyT7YSPYlgiWICF+OhEhMy2ptLeO53xUn5fO0OSUI9CCXIJyWmt2k4oMMmioVZPTBs8CXGQ/kLX0rAlKN2YapUanN0DAcLM+YP4q1/ee20ucc/LkzZkAdpz2966cQjUUznJi0hTR+2JmpSHZTiy2d0msbyWq5EFaa5plB0In/I72VQ+VdmPEisIHXbPH0Q/QAUCXXh8ajYOScjRKZ8/LnRgkmcFv9W0kulO3LKFR2w/roE40YqkQd2 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);