From patchwork Wed Apr 19 14:09:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13216876 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 BC399C77B75 for ; Wed, 19 Apr 2023 14:10:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 56746900004; Wed, 19 Apr 2023 10:10:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 453586B007B; Wed, 19 Apr 2023 10:10:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F404900004; Wed, 19 Apr 2023 10:10:42 -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 1D9706B0078 for ; Wed, 19 Apr 2023 10:10:42 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E269C1402CA for ; Wed, 19 Apr 2023 14:10:41 +0000 (UTC) X-FDA: 80698326282.14.B4F8765 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by imf07.hostedemail.com (Postfix) with ESMTP id 9E79F40021 for ; Wed, 19 Apr 2023 14:10:39 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf07.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.53 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=1681913439; 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=2Fzr57yVT4AGfP8f/rHc++3o/RNaaVBknK7ki+b7wqg=; b=2KJX2r1SXNDQV9EacNifqVxwcr4yi17IDsQwPcRu3FHk2+xU31sPOvMaT9Yybev9WI2x5o 9jadHEgytSAZ0zSE+FCfdwFIvg7x7tM7vM6O3uIkhV1qCZlJSjJX9u7CUjzwh4zACgLqM6 auzkDok3ZtgaCjT0BrxocF26Z+9tVTg= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf07.hostedemail.com: domain of morbidrsa@gmail.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=morbidrsa@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681913439; a=rsa-sha256; cv=none; b=sg875wEFS5HLOmKm7aBKYlQpELn3sm/3j0XwDJSvK/QCSmQb5X9lGI6SY4MeQ5W+U3zikn dxou/kMpb4P+hWS903LnkikaJogyFXS2V7yUn21XUNg51pNWucPUpUqciyi4vmoEG0M8kr u2beZTpl66dDDYLvfxXj/5k6GKXkMm0= Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-3f176a16c03so13865685e9.2 for ; Wed, 19 Apr 2023 07:10:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681913438; x=1684505438; 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=2Fzr57yVT4AGfP8f/rHc++3o/RNaaVBknK7ki+b7wqg=; b=FeL9TFYOhqn70KAGXDatG3+t+z+MfR2dVckTpFU93xgWNW1CJp4AFi9XO7fAdjhPaB rEkqg5WxlBBnn4tjrTSb3N/JoIBoN14TjgLy/h+djYi1BCgC19z+Do6DWLxYJAWz3bxV vxM6T06yk8hR2JRpo5AFvppPjKYrffWYITUcAxLYdWx7xf5l+GeNgsI7im4IP+v1FR4b rBatmj3CmSGu2AO/TsnR9VEDux9WUUtELhRq/bSqy1+BFnkRQcAc7FJjGNmLHpKAhxpV 7R4JN9Axja6phStdLBXZ4orbvbs3D4R844sQcpyAOIvwymw+R+EGwuvugU0MS5/a4RzL fXZA== X-Gm-Message-State: AAQBX9fTPSXwjzhcVi+i9qT7lowNIxthSA/ZAQgJ4+a2BqZrx2j1a13V VrdpN06bCBSICxauJ+jzUbg= X-Google-Smtp-Source: AKy350b+UwzbHTOCNn17UYnXZKHlXNJQwvx+l7TgssVsB5tDN4gwDjzdQ+Z4ngjORp4WObNT+HzhDA== X-Received: by 2002:adf:f10f:0:b0:2f7:efb1:ec8c with SMTP id r15-20020adff10f000000b002f7efb1ec8cmr4366904wro.23.1681913438239; Wed, 19 Apr 2023 07:10:38 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 07:10:37 -0700 (PDT) From: Johannes Thumshirn 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 Subject: [PATCH v3 06/19] md: raid5-log: use __bio_add_page to add single page Date: Wed, 19 Apr 2023 16:09:16 +0200 Message-Id: <20230419140929.5924-7-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 X-Rspamd-Queue-Id: 9E79F40021 X-Stat-Signature: 58ezmuypd6kjfxpqap4i5hb8exyapfb6 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1681913439-805244 X-HE-Meta: U2FsdGVkX18O6M0Yr36tY6Ht0550Hu/UGUtxOdf9J0ZQUJEXpSh5+WdnBAKx8/0RThixm0aorg7XtbjT0CK9JDuHBgkOl2eGGSdIDk9CUsXp/4xZlLw3vs32GLRWmUqbjayLrMJiQpPjmqtKZeIq2Fw85lFYC/guXnYP4851ZANVFR2SGS2yLEIKSIanpitfxziuG/q9AMPIsRUySnh165raAUWyHLkhmVxNDNcKhujNw45m4wySxqDNS7GPjuo/kkXLtZ/ozLna+kdJ736b4aTe8ntN3GuQ9irqtJGajPakK/Z+BkfhroUOKcOqk8x30TYLEWb2ab3edCriL4P7jU+X7URPOOkaQ6OXmmafMexVzEBOiFDJ3O4vp08J2nrkQVQ2HN+PiSGeP+H0WdaCK7jZR0sxp6vrBhNrossisHYLzxxQOZBcB4PzMZ9HeWcPFbhbtRSwndPmJo0FUumDVbMal0AD6IBBtoSxIaNQ2HoBaSjrJPnPkkSQSdraB+SeGXFg9FvCIeDaXnZp9XBrGmwIddIXsrPRIokmt/2f8dOaCMQBmLGM3+deajkj/57fM6Rf+UyhNb2InMDO+njgtli2/43jTwIZlLRne780PPk7nZLmjhOl6aiNV130bqB4O3dYj06iaErqrfHNNwU2UNJQj/v3Ty/jFMtL9uoQ5djK/MXlcNIjUC0jLnNhnILvkVsho6OIUk/Gu5vUkMOHwJxqApZMdISvyc3btbaPmI7t1K+V/5TIuX8NZv8lLAoWbUevLC+9qLdIPVhG22PVXKRfKooaFqzQt9QcAILd6oSE8NTOCaAfa9ys63YkFZncLUrbLGeujJSQLKQFcCX/Q/N7dFWXiMTYw7HKg/g3umzsKasIC19nDxj4U+htNgPb7zrwrXdNjkQcGCLBaVMq3KncsDL+B7VLZVrmMZ4XVOLIa//1AVgQuJo/pROqKyaf/qhk45/wxtg6b03loX5 3BEci5iS VIKmyqyurp7Ixpi+p+IWpGMs0tV8LLxvGfifMZSgwvLQ3J8iIgX6ixp19Mz4D1MXIv3DUCfvl9mdrGw9jxvGtFR/4r+OVBEeQM6mqHJKyknzGEOzC9XhOuQcssBd/0GSJjO+FtF4HrzDrM5g9oWDVQg8t779uC57fsaT7a/dSVB1fxy7MGv3rvpeZt7s1GxpRPLhLiY3RVCxZpjcCC5L5SvIFgH9tan4AlS56EgRaaDFdaD2OvkUatEwEnYbcxQGgo1KIbJrP5plzZBmYrYqCGFQhg83MFus+Rjbw38iwsx4roBTloaByTy6JJaxrFwKJSre2VP84nOi2V3uLm44H7O1DMcOIDmN3NPYH4RWUhSGgB7phAPWeouNOKwR2h5KlX055sSw0NoaUJvW9mOEaXOOENuKj1iw/i9qbTXpqnwey+O1ktbWkt+aBoYTz0BgyE3RjnpqIt7vp4/k960UhtoHQVonypCy9ZZAXokSMQAmEKBdQ7Yx3EeFGEkElksDbv53GOhyvwrhf7Bw5Ng+Cov9H9QwmjB2O456eTjke1xcT4sN51uZgagkGd5ymcDERK/HFSc0dTbRRvI8THOC7lW56prLNQc/NkUGLyy7OgLyOhliXhfXqOPnNZZUDoPzmdvYc 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: From: Johannes Thumshirn 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 Acked-by: Song Liu --- 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);