Message ID | f9a4dee5e81389fd70ffc442da01006538e55aca.1685532726.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 3B9F6C77B7A for <linux-mm@archiver.kernel.org>; Wed, 31 May 2023 11:51:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C88FE6B008C; Wed, 31 May 2023 07:51:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C38BE8E0002; Wed, 31 May 2023 07:51:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B28A06B009A; Wed, 31 May 2023 07:51:47 -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 A02F56B008C for <linux-mm@kvack.org>; Wed, 31 May 2023 07:51:47 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7A10FA0238 for <linux-mm@kvack.org>; Wed, 31 May 2023 11:51:47 +0000 (UTC) X-FDA: 80850385854.06.AE2CCE7 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by imf26.hostedemail.com (Postfix) with ESMTP id 6698714001A for <linux-mm@kvack.org>; Wed, 31 May 2023 11:51:45 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=JpQ3pDzz; 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=1685533905; 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=7tVUjP4+PH6St5yF3wX9Wp96WFgE/j1N0ByIBSNUfaQ=; b=xwyOeTd/jtF0cKoEQ32K1L7MSwtzoTN54o41gqLH2fKEKaOLrnFgo4WDSXFBO4s+nF8Yj9 NVnjQZi+0IjUlXumNbQ5BKdatFrcxR6LymM0O/3mfEifaDjPZWAKc1QnE30y0N1EWrSkgS Fu19IwV1ll+vUraYMLE9Qr85HULBE4M= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=JpQ3pDzz; 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=1685533905; a=rsa-sha256; cv=none; b=P4gWrQOvaFEf13ue+8AHwfbJmulOtdQtPcB8r/NMih/WFN0xDziE5lcZFjb61CQjkI4kDf r+LegXhRVzN+98dxMkQlHjIQceSuaJjXO4Gh5JfRS/+xvLdPdqbp//QN6mDLDmZaU8u0T9 HcNuxz0rnYxhXNNQigau+/H9FRw/eNM= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1685533905; x=1717069905; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wyX37qrNukpOnFd0kuw76h6e0vzZ4DyBtjizjt54zEs=; b=JpQ3pDzzP/UzK/L8axRMmRuO1u1XURFIGR4ua7X+vVgn0rGMtWar7+KQ v3ZIF8ZuXyzZDpH1SN0vEndvJDoMRcn4ZYZ6e289ujRX3GfbPNS8lTIvs ADP1MEjpv0/Ol9Gncad+0sAdP4hjZwo1MO6WOgpfeM/xLvOsRzZov2A2g pVOFD6tZoaQcI8TBM0wgDzjnPQ8cAeNivwF0M786h60WYN0wrpTXz2Z8K oomyVfrzDfS8va/86eP6Gx1ALLpiEosvK6SOFjjyKHFQFfWSIQY3+i7rH 9nknyR3PjQwz3oVjMA8hNObcVJUZBkseEQq1bPFfyahG17QtTrcmvukbJ Q==; X-IronPort-AV: E=Sophos;i="6.00,207,1681142400"; d="scan'208";a="231985149" 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: RV7ZByqdMeIvg0HLvW5oyqzXDzBalWnK9W3zsNi7KLK0WswdWxSH2r9vaEnh3voZjX4wAwFuOX NX5yRkIrJXmvys+tjhgB96BVehg/0jm+83TikoZz/L/pOiYoGm3KS3AWJ3ANtBUPtqbY52NKIL EBY3oYrdoKXzSz+euH4m81Chm/xTlIevtccd9f2NmBmPdD+3KiL3jV03CAU+2jj1m14zWXdDqU /mJr1ABm5P6Cq4EO84r7EOCFZVExjR2+MnSKVITnw47DndSfdTe6FT0LOkIh4957HE1wrPMe5J R8o= 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: xo459tElfFqtwBDe2sQAJqvwfBpbSzCQVTTIg+wPUWJFH5rvf87QZ0/LRdMy+YjMhlouZBBxmo sSFHKg9lUYcIkRHQv54nV+2OgEzxoHzxVahxn3BeeKZAyYylUuWRRTeDS6dvBOIxkJePE/rTcC eYbX1rHn5bbth8QftqRWLPHth0Gq61eGFZ6K61AfXG67LUgq2wZH8hWCBqD5V+7su+uSzYeeSR Ss5cmfzwMHsFg984FR8v7pis/w9ow+W2i6iaGIo6tiECTtkMKiiQqzdfNTk2BbJ95DDObBEoN5 z/8= 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:38 -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>, Mikulas Patocka <mpatocka@redhat.com>, gouha7@uniontech.com, Johannes Thumshirn <johannes.thumshirn@wdc.com> Subject: [PATCH v7 16/20] dm-crypt: use __bio_add_page to add single page to clone bio Date: Wed, 31 May 2023 04:50:39 -0700 Message-Id: <f9a4dee5e81389fd70ffc442da01006538e55aca.1685532726.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <cover.1685532726.git.johannes.thumshirn@wdc.com> References: <cover.1685532726.git.johannes.thumshirn@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6698714001A X-Rspam-User: X-Stat-Signature: tsguymw3fi3mjehbi4b8x39wescrs3c4 X-Rspamd-Server: rspam01 X-HE-Tag: 1685533905-626614 X-HE-Meta: U2FsdGVkX1+NGaaCsb4qdIAE6PF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9k09kpzOshIpbS6LoYVAUGiN/GOPo6QDT48v9qhRBpdbcYrxGJKw4J0WMyKvMRGerjVneZSLX4pEqcB7ip37RkXaIWkO2Vhk3wirP+ZfecsFCpmkzln/OhLQlGamcYSi+nQJOpSzkIBsgrqfzP8eQ2m5VkaTRzkkvmJSNdDt8RBnXo7lc2g4xpda+VlvO+kL8an2S8Oh6tFpGE/3cCwdV5tQzJiq+6ImknyyXx4ppTNq/GTtMNpJREzekU/kywPD5Ad1skjC0XQ1sgcrwXBMd4w== 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: <linux-mm.kvack.org> |
Series |
bio: check return values of bio_add_page
|
expand
|
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 8b47b913ee83..09e37ebf7cc8 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1693,8 +1693,7 @@ static struct bio *crypt_alloc_buffer(struct dm_crypt_io *io, unsigned int size) len = (remaining_size > PAGE_SIZE) ? PAGE_SIZE : remaining_size; - bio_add_page(clone, page, len, 0); - + __bio_add_page(clone, page, len, 0); remaining_size -= len; }
crypt_alloc_buffer() already allocates enough entries in the clone bio's vector, so adding a page to the bio can't fail. Use __bio_add_page() to reflect this. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> --- drivers/md/dm-crypt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)