From patchwork Wed Mar 29 17:05:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13192955 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 A2AEAC77B61 for ; Wed, 29 Mar 2023 17:06:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 36186900004; Wed, 29 Mar 2023 13:06:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2EBD1900002; Wed, 29 Mar 2023 13:06:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1646F900004; Wed, 29 Mar 2023 13:06:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id EEC18900002 for ; Wed, 29 Mar 2023 13:06:40 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C164BAC36C for ; Wed, 29 Mar 2023 17:06:40 +0000 (UTC) X-FDA: 80622564960.13.46C9F38 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by imf21.hostedemail.com (Postfix) with ESMTP id 882E51C0013 for ; Wed, 29 Mar 2023 17:06:38 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=GEYxYKyv; spf=pass (imf21.hostedemail.com: domain of "prvs=445a3f1bb=johannes.thumshirn@wdc.com" designates 216.71.154.45 as permitted sender) smtp.mailfrom="prvs=445a3f1bb=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=1680109598; 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=gmg/nEFoDT2KcvdVtETEfPsUn5bcYaHKrbnC5/isn6o=; b=LCAR7LF34vK+d2BtuAHOFwpL6f9pNIA2QJ2gaRnGAZB/jRwQYBzWXbqtqBZRcJKq94YyA/ hVsqCpp4M0suXtC7OG/vjh2jPwPYVyf7qry/YZ8W4ahObbT+z/NgTrk5kpDW/ofZTvTqie rgwnmWfX9RF5aKFy1E7Iw2Hhhnvce2M= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=GEYxYKyv; spf=pass (imf21.hostedemail.com: domain of "prvs=445a3f1bb=johannes.thumshirn@wdc.com" designates 216.71.154.45 as permitted sender) smtp.mailfrom="prvs=445a3f1bb=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680109598; a=rsa-sha256; cv=none; b=zrbYXsH5sRp5SYUalnGTbnAng4RT6rMcovt9mT8G864MMP1rx8UsxNTupWGOvLQz9olla4 vleI1r3bs8svJSgXwdALgShNsZiPapEeibT+qHatIk/XIBJaHHAC2sT2JU7e9xZPFVf37v bBQjbFhoXSFrKBCgyRv/lUBTdNIBI+s= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680109598; x=1711645598; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tehGgAgqd6Ug1q0ulEduzG6BKUhY0WsPTR6+2QwYTdw=; b=GEYxYKyvrWiwTG/EQHkW409uZx5P1VP8TnxJRwRD0DOXr3ES9Qnwu2WD W4WYCrKVoSMyArm+SN8gSeKWTvre43iNR7vLX/JoP0jbI5rbXHE0z70gR qz6e4Hgg34iFpqlt0Cst7M1mm20+TqDmDKi64ziLyiUUAb6v9UUxWEgBO X129GPRGlOFuiKoEYBzgD0xktRoFT0a5ez5uQI0HMagbb949Z8+f1kepA EK9qXwW/cWeaNhuSNmQgPrSKkU4/Ata+OVtfrVG662d4XmBFgRpGMcptB Purb8Qt8X8r3JTGSX6XdL7emAeev1YLG6pBlScL4WdENno8pEClE2Hs/5 g==; X-IronPort-AV: E=Sophos;i="5.98,301,1673884800"; d="scan'208";a="226807038" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Mar 2023 01:06:38 +0800 IronPort-SDR: Gj5tAQ+8XFGv0w41zj+aCTDxoKxQrvpzLEtId4oTrZhERVMbUklvKd54YstYrpXFK/uDC97+50 GJ6KHo2HGKUhAk8eSAONjkCWT7bQOvz/D998aVGFXQOgTrKpj6Oi44MotQcajvoaiGJIcD+4jO OzTi8QseiIyy4N2pC+9dHVDJ2FBTRF+Qy6xYcnM02HrndgiUFrmFdacLT8hVxpqY/Bx+DYhjO8 bC+DsCRPIivArFz3hcy8bdhXZUC2IaIjlG3/QtNOhAivWw1j/klkKZrfMMY3CKrWPGqdM7s9mI KxI= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 Mar 2023 09:22:47 -0700 IronPort-SDR: 6+prpYoraSp9aFA1hXlXHyHu40E7L/eCAIlzO1/as7m+QuTtwlfLU6oRqm+u0ktT4yW4nPXxtO EVWWCSi0KFouza9iXBVKHiWfRjRCi3K8NXAjcFmNFaydHoskQ0l37e1TsmHPRtc6H6IjsIJnWc qpv27cTnKw5/oXlPKjLCcoz7fE/btbZpL05CDoXEXYjFbavUThVFCHI6KRsWesZV0+mBsx4ofC KwsVDJikGzCScu3CFwSWTYXEDPvbMWFR+EaLM1F8AZskQ1sONkyddBy6iSLZ2oemLVljH3RxOv qao= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.72]) by uls-op-cesaip01.wdc.com with ESMTP; 29 Mar 2023 10:06:37 -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 , David Sterba , linux-btrfs@vger.kernel.org, Johannes Thumshirn Subject: [PATCH 06/19] md: raid5-log: use __bio_add_page to add single page Date: Wed, 29 Mar 2023 10:05:52 -0700 Message-Id: <492cbaf4225065838d25e04f8488528e50a52e3e.1680108414.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 882E51C0013 X-Stat-Signature: zat8164gwdeup3baqs47at44gqds4pyc X-Rspam-User: X-HE-Tag: 1680109598-934136 X-HE-Meta: U2FsdGVkX1/8WgXDL34NBV3xtYfk4gRsNcB2iPGGUnXUeD99Fc7Yxk/bsrKuzKHawLUc7zGWMOnrpGHViRMKxQw9cLVnrlxsst9CIFYvdThF7hcCo43sQ2kzr5e+cQw2wFjdoRQn0HKMTFzgy3tW871fNxTzb3UkUVMqa7PAKCpPuvQp173SJZF2/1Mn1TyE1V15bdMxm5pz32K51zmNNF04MduVPzCUzGv6GPmIoNuZ6AZuSrTSfwc50xyVoOvkcyP8G+2/g0KTRB0fWv0z9YVbfa03oRlLr44PE6GgAiUIa5VxOd0Vl1BbnADBXc8zuvyE6bWp9obSyRs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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: The raid5 log metadata submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer to marking bio_add_page() as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal --- drivers/md/raid5-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 46182b955aef..852b265c5db4 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -792,7 +792,7 @@ static struct r5l_io_unit *r5l_new_meta(struct r5l_log *log) io->current_bio = r5l_bio_alloc(log); io->current_bio->bi_end_io = r5l_log_endio; io->current_bio->bi_private = io; - bio_add_page(io->current_bio, io->meta_page, PAGE_SIZE, 0); + __bio_add_page(io->current_bio, io->meta_page, PAGE_SIZE, 0); r5_reserve_log_entry(log, io);