From patchwork Wed May 31 11:50:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13262055 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 6AE20C77B73 for ; Wed, 31 May 2023 11:51:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0C91A6B007B; Wed, 31 May 2023 07:51:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 079FB6B009A; Wed, 31 May 2023 07:51:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE7F06B009D; Wed, 31 May 2023 07:51:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D26CE6B009A for ; Wed, 31 May 2023 07:51:49 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id B3F73A02C9 for ; Wed, 31 May 2023 11:51:49 +0000 (UTC) X-FDA: 80850385938.18.244EDC1 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by imf26.hostedemail.com (Postfix) with ESMTP id 8E26F14001A for ; Wed, 31 May 2023 11:51:47 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=k4eSqbp1; spf=pass (imf26.hostedemail.com: domain of "prvs=508ef2a02=johannes.thumshirn@wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=508ef2a02=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=1685533907; 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=sNH7pVmdygoeCZgHZmSqANM+8vLZ64wXe5n0PirP0kQ=; b=W8eTvAt/CUiX6p/wW+s6WTYJ4YPbcnabMV/lyO3xaHM8FNlVHzDn1IXgYbdUOncoQ/7cWE jvOj03amF3VbtDw0gyPUgmtKVpK93OigXzmizSacf8odlvtd6Lr5m7Vld3NihT8M00JLE3 fMrsyXL7OHHBbnb94F2XrE3hXnZcHGM= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=k4eSqbp1; spf=pass (imf26.hostedemail.com: domain of "prvs=508ef2a02=johannes.thumshirn@wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=508ef2a02=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685533907; a=rsa-sha256; cv=none; b=2Rb/myoUKu8gtby5JZxWzjYWnan8tb8pL1ZqRiCds00feC/sJQwHKV9GSsfzq91HRUO/oW CCftwu4SmE7c2ylFaXKhYFQmlHUtxYzmdTazlb6VWvUcpjTpZngY9YinvJkkyka1EO1eFG FVvY59vgZBM+zM3Wvknyam69m2hdEbc= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1685533907; x=1717069907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eNep3j+omtdw7VUEVyvSEuMvQR4DwZ3logtHWgIlxjI=; b=k4eSqbp1fj3083PkwJjNIxMcsMqWlIPrnW1KnZ5IIxyNY+QTR2x2Avaw PS8CClD9XVliG70jBIpMLMs263nTuDvoDxoN8vidBl8InK3o+9gXyuYim 6DNOCAFZf8Z+wCxknt9hGPoDWFJ5Z1l5c04TXOhjpQphL2Qd3FdKCu+tt hlyL75w1+luNPchwv945BsGvMcvLTsPYEQcSoYsxl2CXwTwwS03S9xPQX FBI2wPFLoiQORDlR5sceJAUxJDmIGxJWG6om+hdqvDwixVY3n6hgyx02U 3QF8QSeCGZ1UOVjAfm+5KopKQm2aCKw0InCU2VwW+vyDPytRCkZNp+8IE A==; X-IronPort-AV: E=Sophos;i="6.00,207,1681142400"; d="scan'208";a="231985150" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 31 May 2023 19:51:44 +0800 IronPort-SDR: bw7la0PQ3W8gWs2NTTjCMwDjFt8V7Z6SGDhQl+x74wCZNBJLBZHQ2ECxy+GizLldDwWThf2Zrc /5KXmIdpJDqPMKq6Y5kIBVbuUGvhsTaH4wZM7hyueEhAjSMqMJNRLQrKIbQq+hr1tUPIytRbnZ E1ELZBZv5GaQ4p2IGeWLq2w87w9OIoII0wrEH4Ud4ZBr8lUXir7ikZErtlNY2afbVXBqoI4xvO 07kPAQ4UUWtUjFzXeO73hWdwfCNksX/kL71miPIBjoa4h/uoXSdWdxowIHbBRVmK221Las70PI xZo= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 31 May 2023 04:06:36 -0700 IronPort-SDR: FCL2eubAZP5N9vA9HDK+m1l82gIsrfnKwR7xl5QF91RBemiBMgqeza4/jZiezHWUmx+A2BPvbg diAJW3D6qzTTjWDhUmm4+CPI/5Pg7yzgXHh3HJFIrkz3I6/YCxvrl5dZGpioD3FIrHJ11rp7ht I6HmAKaEKAajDqnW187jX1JXP1SwiHNqHZle9nVdQDpjjStKHttQk7X5nq4km22hnGrB8FLHbJ 5GGj+z1T+oiCsX5btGRw34bpXv3+vXL9f6GlctCmHk5dzGi6sYWMqAROn6Jr2ed+EqoN495klc Cyk= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip02.wdc.com with ESMTP; 31 May 2023 04:51:41 -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 , gouha7@uniontech.com, Johannes Thumshirn , Damien Le Moal Subject: [PATCH v7 17/20] block: mark bio_add_page as __must_check Date: Wed, 31 May 2023 04:50:40 -0700 Message-Id: <7ae4a902e08fe2e90c012ee07aeb35d4aae28373.1685532726.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 8E26F14001A X-Rspam-User: X-Stat-Signature: 185crwg6agog57zmmkc77tx5pcu6mbbs X-Rspamd-Server: rspam01 X-HE-Tag: 1685533907-231327 X-HE-Meta: U2FsdGVkX1+IquTUcIZmm0cng+keYfkiUUb1tyKrxj8DzvMINBSD02BG7NlXOa4PwCd52l5/m5Y8Lcv6EPvWj723GoN1YqK60jOOnKFVKDbFW7+gOBDfVzA1G8fSXcW8M0CWHRqbw35p60EYFWnvwdstLv7Hw8bfPRcxo5XPfh0Gxkvybr+M1gdcNXhTv/QxS4WXWUxp6LViRQK8lh1Mp8BPoSHujrwpDY3Qn1vPPPS7hrmjK8Zm3NphjmwkKyRC4HWxyYhREBUqCIhkLn2M4HsQp91R3S6hPwuRzOkdHcaWxB6QHuE8QLd9QxiShb7/00gC+LMoNckSlhle17s3fzgg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version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Now that all users of bio_add_page check for the return value, mark bio_add_page as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig --- include/linux/bio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index b3e7529ff55e..ea2d937d3cba 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -465,7 +465,8 @@ 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 *bio, struct page *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);