Message ID | 20230419140929.5924-6-jth@kernel.org (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 CB7B0C6FD18 for <linux-mm@archiver.kernel.org>; Wed, 19 Apr 2023 14:10:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 65210900003; Wed, 19 Apr 2023 10:10:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B3ED6B007B; Wed, 19 Apr 2023 10:10:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40541900003; Wed, 19 Apr 2023 10:10:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 27B196B0078 for <linux-mm@kvack.org>; Wed, 19 Apr 2023 10:10:40 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C9A19AC14F for <linux-mm@kvack.org>; Wed, 19 Apr 2023 14:10:39 +0000 (UTC) X-FDA: 80698326198.05.7488480 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by imf03.hostedemail.com (Postfix) with ESMTP id E4BF32000A for <linux-mm@kvack.org>; Wed, 19 Apr 2023 14:10:37 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf03.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=morbidrsa@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681913438; 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=EWddmUi1sUqAJfDu3vTNgbuTywHhrfsi4XwupHN4WwQ=; b=zWkh8RNAXqSCQDc3URjgGSQgpyDwZHKvd7Xd2UCTiv+IjJ/CM2e0iAFg9pT2skHNEaJqc1 hzaRsocTa7Oj8QmZH+ZS/Xzomf9Rmo6DuYc34x7ZC6hghtsv6xtmf4Lfr3yvFUabFsDP/M I4sskb2eF9DvJMrxgFwwSJX1G04pS5w= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf03.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=morbidrsa@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681913438; a=rsa-sha256; cv=none; b=TaTcRsbiJRNKO0bw3x0KxDaYHQ49006BS7B69Jv8w+R87phKj8TcOoknzfpcj46kShhzx9 ojqeHATHC5ODVXbUuP9+XKdyfcsYmAogV7d1bsPH+To8+/YRKqJ2mVGFDlHTyBQt2ldrQB YWCeVRBmAWwyqNgp9852dD6n18M7Fi4= Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f18123d9f6so3362675e9.0 for <linux-mm@kvack.org>; Wed, 19 Apr 2023 07:10:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681913436; x=1684505436; 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=EWddmUi1sUqAJfDu3vTNgbuTywHhrfsi4XwupHN4WwQ=; b=LFszx3ufpgSiYLk4DW1d7bEfwbh/wiSzlUw5StFfUGhklcZ7klmEpRfr0hw1KZNFrX AUoN4AwsMm/67KqzVohpkAYQbEt0tuv/VF+kXPAGZjPqww9nq1bhCRwQKGi7Lpca9tao KlX1zC3B4WwFnF+sgUSyQ3FSLGInF8GL2Hg1TfxiTlh/wfM1vzqa8IyYi90oeiDI3/TF CAYvfN9xmkdZ+ZE8iw3YpexziNbDrT2jmANjaF7OR6CVTfB5nDAuCux/9NsP9BQ3GUYP umQTOqfpZUUbbyNC3fVDfm1/1kVkmhaWhz8TAgMxyz8A7mlk5woQY1q7eZCTQoTiGDeH PhKg== X-Gm-Message-State: AAQBX9eCN+L9Nai2sXbQ89NeF6x3hR84RgRAdl2Kuk3OdLdr8TJAb6Fm Ao0yxmLUtPD+VbX/WMfakCs= X-Google-Smtp-Source: AKy350ZCP5TtktKYHNeFf1z9UiQzamRZMP6zyEAA3XLpw0OrBxsfVcM+yuHTi4CwYRfJVTx/CPP8lA== X-Received: by 2002:adf:f0c8:0:b0:2e5:d4f4:c43b with SMTP id x8-20020adff0c8000000b002e5d4f4c43bmr4684807wro.55.1681913436518; Wed, 19 Apr 2023 07:10:36 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 07:10:35 -0700 (PDT) From: Johannes Thumshirn <jth@kernel.org> 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 <damien.lemoal@opensource.wdc.com> Subject: [PATCH v3 05/19] md: use __bio_add_page to add single page Date: Wed, 19 Apr 2023 16:09:15 +0200 Message-Id: <20230419140929.5924-6-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 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E4BF32000A X-Stat-Signature: b45e53653egc7q644uc4offkbqqjuu9d X-HE-Tag: 1681913437-444378 X-HE-Meta: U2FsdGVkX1/t0BMtIDvrw6th5B4Y93sjVC2A8HcpnFEx1gwmNMGh2uidGxjwFgWjtLLBESAKNlIm2x6aiu26pCCkN7H5/haQDEIT5c0QbnnOoNsZvpf70HTJOQIy7NDmVf38Z8UVgDriL/Qr/8e4FGVagdbueYNQ2d9upjenH8HEGpVGx82c5xWJtajGFPI1v3VwNH5HtWt+Fg5807CJrdt3CFV9qXIL90alPDFCJ1ElfUB0pXj+eoBUAlI6Ahvr5wAfLrb6/Fi0Hb2BSli3ighnpAwbSei/Tj69+3ob4opf1jbfMXRnJ+GVKNkm+2wTyAWQatQ5xq6+MW6A7sQ+oPpuCOVrAf7cZaXMzXaziq2V6UTO1rHdG3j+ocOqK823IEDx9E0L+M2hU3K9d3CmRKhnp65zyO+uIFh620lYTJ/M4+Zf6YEY8vM9RskIePNSoR1vH/6ZnO+IRlPXs+Rq4YbOGsQTbWxEw7ds2J1/2dHwhvQOuXDdsfqtJyWNxM9o9//MxoXf8LMn61u7KE9wovF1M2c7YxazOzDZvyCM4SLJp/+WN3ZZW+eGzXwwXnPaLgAjrnPcxpPigoFaSQqJj04xkfH9d1KyZJsbMDMBVZQ4mifJpYPJEApi+v9hH5GMHbp0FjvaQ3ncz2fGneAyMvyeLkuD9OeZt9cBaG8cQGHxpZHMprC9QRfnBmwugvjk0Xn3MxElP1h5dZ0c3VhwdVBeJPl6XJDf6QS9jSRYHedrJZxtDXflvEpLB91WS9h3H3BSzjIJwCSlOj3ynrcC2c0reLPMiKLh9KvNDQLM9c0OJO3aWac1k3Mix63Sj2mCF4cGW2Ohacpp5osoXvrlj/HSgJsGMg3t9K9DnLMseFOeoTLRH/icDmF7JM94McWtNe324pfOQTjNMIwSX8kb8JWfSeFEz/8OjxvlyP6VEqqhEjjAeRCkdi34QESBS07AEsxSeOHPP4eopCpI26Z MchvHj3Q J6Ic5+Ezz6V0kG0t41rSfmH6qOoTKvbxCtGq8y1ffFhlOX7Si88O+z5lJcbT5uA7ba9tPIt7c9FGRAYC1G4QL05d9nKmQf2TjC60Sp1wcIVlS+iHNP5n2d6dwXLN3CKH3a82csDY+hxwH4f74axmDMHwnEWVSDibqyktgHiB7Ve5Pbg+Zk4QxneLhBC0lqyjsHMePPPielWiDEtIc2rqB2TRz+G4LqPpsbVc0/PEE5HmfE/Hg6cL6jb3StDtdOly355wwmmRz9NUxj9tK3ZBfvwn/uuRbaPDIcWzhuKfxUq+YI7HuFhmnpZBXagKQIXqlAux54JiWoq4hnpi6W3Hz0M9Pf6Y9WIKZ04cur9Ehz0Pvzuvlc/mxAKWz6IMSRpikTr8em7oIhnCkiLupU/DVQPYIjxlqLttPv5zA1Q9MN1Pbd/cYcUQ+bnGrXvqmk9Xq5itzyRRd4WltO8Ob9z/CbrdkP4s0AwE44Rm7+t9OJTcKsxbB/eJ+ikcXs5896u0wtGtOAcP3tO70f9e0RelhgnM7SybCUjhb3ZeE31G4DVS2G7ay1BZXhAAFerfTpArcjv3RJmh5g8Qnt+qV9o/vurM6RdoZYbvvDpZgmvmfor9NR1lA45WKNxZ32xC1JqH+/OZo 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/md.c b/drivers/md/md.c index 13321dbb5fbc..20b9cd7c2f39 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -958,7 +958,7 @@ void md_super_write(struct mddev *mddev, struct md_rdev *rdev, atomic_inc(&rdev->nr_pending); bio->bi_iter.bi_sector = sector; - bio_add_page(bio, page, size, 0); + __bio_add_page(bio, page, size, 0); bio->bi_private = rdev; bio->bi_end_io = super_written; @@ -999,7 +999,7 @@ int sync_page_io(struct md_rdev *rdev, sector_t sector, int size, bio.bi_iter.bi_sector = sector + rdev->new_data_offset; else bio.bi_iter.bi_sector = sector + rdev->data_offset; - bio_add_page(&bio, page, size, 0); + __bio_add_page(&bio, page, size, 0); submit_bio_wait(&bio);