Message ID | d406d7e205f7c7e701275674f77c7e21b93ae7a5.1680172791.git.johannes.thumshirn@wdc.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 114C8C761A6 for <linux-mm@archiver.kernel.org>; Thu, 30 Mar 2023 10:44:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA9B2280002; Thu, 30 Mar 2023 06:44:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A333C280001; Thu, 30 Mar 2023 06:44:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D34E280002; Thu, 30 Mar 2023 06:44:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7BA39280001 for <linux-mm@kvack.org>; Thu, 30 Mar 2023 06:44:27 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 448D1A08DE for <linux-mm@kvack.org>; Thu, 30 Mar 2023 10:44:27 +0000 (UTC) X-FDA: 80625230574.14.6D2B9BF Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by imf01.hostedemail.com (Postfix) with ESMTP id 36CB740009 for <linux-mm@kvack.org>; Thu, 30 Mar 2023 10:44:24 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=nif1B7PP; dmarc=pass (policy=quarantine) header.from=wdc.com; spf=pass (imf01.hostedemail.com: domain of "prvs=446327cdf=johannes.thumshirn@wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=446327cdf=johannes.thumshirn@wdc.com" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680173065; 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=NvLJF7eTLo27RNoKIJRG6qSoRpaf2jS02f120/4JtBs=; b=rUiLedZ7bESw9lalxWRb8zoVXzAgLDTG9N4NZJAXng2/pdH8zmbBS5l3BbfXdrAe5v7DdY kjCRnRaVzAX0Gm5d2wM2rx6kTB+T0DPjBIkWNEi0Ozde/tf+w3DyuLG8kNoGe1dBUGrKHW c5xuqbELwMxv22SuHhX1zb7tl112TMY= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=nif1B7PP; dmarc=pass (policy=quarantine) header.from=wdc.com; spf=pass (imf01.hostedemail.com: domain of "prvs=446327cdf=johannes.thumshirn@wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=446327cdf=johannes.thumshirn@wdc.com" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680173065; a=rsa-sha256; cv=none; b=7lSSsyrFniQL5SA9jkE7pljmeADHpz6sWjxg7omN48yh4BD8rpAcJiQdfmJh75yFFu4rBD I/D6XLT+RcGHaQFM79TfPER0LNjhggWz9OkTAenOZM0bxtEaKOunMa0nzoPjW5j7BqQWV2 7SjHKIBPXBehkekGuO/JMdEH+rRXNyY= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680173065; x=1711709065; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Kw/gd8mi4cp3C+0+JmkC18fkS8wJMSIrrh7WtKkZNvs=; b=nif1B7PPVKW9Jxy1vcPGQSthlZ6STQqB7BqHkAPddXpbfgxMeSL3sGd8 KUx8c9qzWOjoYt2Kj5zQlKkOZTmQzYGS+BgZz5CrX3kC0ZO42pAh0CPSq l905eCykkXkzLAHRyGiZYqKesYL/2h0vwRtX6z3MMeptIdx0NTlB2HRJB XpU71Ry5Ryc+LtObsV+1oHnHfGON8ABSToSyZ8T1FmGW+VDFUWiLREz3j J+2UEFNwR2IgL8cWpAClrGPkoVNuFD8c1n9cMGo1g1dZtZxPSDNo5hTLz mF3eDRtQ5c/OpYBfwlaH8CHN0zATVR0RB2fO0h8W/kkyx+Dg9pCoo6hDI A==; X-IronPort-AV: E=Sophos;i="5.98,303,1673884800"; d="scan'208";a="231853912" 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 Mar 2023 18:44:23 +0800 IronPort-SDR: zomX7gclwU7ngxzID33FKMzCXBFTNxoHMRYIjEFMJwtbm+AtBjRlv0ueE2oRW2QxgnLd4li3Uo LVOn/cvx+UnWWGruwR9yBolRUzV+uF7wOErZLLoxgG7WV5Wr0mbOHl9wFe5IYeNfHOUk4dLV91 2v/PsYH6sF3qYWRPqk/8E9ZvhIDuha0Z8FN/9KOWQUvhaCewgg/goSqDt/C4+kJgrHzJRDbdNz zykodo6gjgVQ3N0JSIiNFjLzzVAtp2sTNUNmLO0VNH3EPM//xomq3S8zoY6sgFgIqMRtc1wWs0 BAk= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 30 Mar 2023 02:54:51 -0700 IronPort-SDR: V9njnv+t+GuKggx1vZa0T1MyyD/4iSSXEJKOary+Bq17fidU3Wq1CXNYZJCw9uLZGgQvn++tes OUuz4YBad4EEj5SCwfzseRk61pTGeIXQTJ8sWWZ6C/a6IojWDHpOIMFR1kBlWwqA9+1RZimaU2 9ugMrtf5vwEtfAfHMV1SAmH0gL4ClOl0L1H4690JPAzrH+EYrtPzKQsIBiaqdN4IhpHVhohUHn t7AtVhCoScM7RNoNSFn3XL939XSpDOx7ZCfy1+MZ2oQUID6IQmdyOsZrB+CvmCXJX8/vdquFwu xWc= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.72]) by uls-op-cesaip01.wdc.com with ESMTP; 30 Mar 2023 03:44:21 -0700 From: Johannes Thumshirn <johannes.thumshirn@wdc.com> To: Jens Axboe <axboe@kernel.dk> Cc: Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>, Chaitanya Kulkarni <kch@nvidia.com>, Damien Le Moal <damien.lemoal@wdc.com>, Ming Lei <ming.lei@redhat.com>, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com, Song Liu <song@kernel.org>, linux-raid@vger.kernel.org, Mike Snitzer <snitzer@kernel.org>, Matthew Wilcox <willy@infradead.org>, Dave Kleikamp <shaggy@kernel.org>, jfs-discussion@lists.sourceforge.net, cluster-devel@redhat.com, Bob Peterson <rpeterso@redhat.com>, Andreas Gruenbacher <agruenba@redhat.com>, David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org, Johannes Thumshirn <johannes.thumshirn@wdc.com>, Damien Le Moal <damien.lemoal@opensource.wdc.com> Subject: [PATCH v2 06/19] md: raid5-log: use __bio_add_page to add single page Date: Thu, 30 Mar 2023 03:43:48 -0700 Message-Id: <d406d7e205f7c7e701275674f77c7e21b93ae7a5.1680172791.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <cover.1680172791.git.johannes.thumshirn@wdc.com> References: <cover.1680172791.git.johannes.thumshirn@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36CB740009 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: 5jc8n567c7ygbh3o499jugd3prysnzd8 X-HE-Tag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3OwmXqzljCXILYgpJwU6rrqNM/Uz0amctx7twxUjPVWjD+lBAKI/JNYbHOJFfFMzlRc7bjtR/CsqAPSqUY9A8vcWsBfGLFpGeZHw91Q36lVDf/6+M685MaQ1I6sL6XY6NphY2/Q5ED6s+dLzkIA3H33R2po9SHhLYhnLeu5fVOt7OGRndYJ04LL4VG9ZqdHuqM1lcl9jgYBC+kUMaV97jPRCvU+jZ1yGkC0+Kel4JhY5DJ0EE9PdT0J1nCnZ0+WTe4QrGL4nDoxtkwKDp0Du964b8gHltjw+WEUsgLP1Y5iygRk3RvMB3LLS0BSgNomjpH9q47y9n/JeyYJ/wzBr X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
bio: check return values of bio_add_page
|
expand
|
On Thu, Mar 30, 2023 at 3:44 AM Johannes Thumshirn <johannes.thumshirn@wdc.com> wrote: > > 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 <johannes.thumshirn@wdc.com> > Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Song Liu <song@kernel.org>
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);