From patchwork Wed Apr 19 14:09:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13216951 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5958C77B7E for ; Wed, 19 Apr 2023 14:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232550AbjDSOLU (ORCPT ); Wed, 19 Apr 2023 10:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232316AbjDSOLE (ORCPT ); Wed, 19 Apr 2023 10:11:04 -0400 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 080C716DC9; Wed, 19 Apr 2023 07:10:48 -0700 (PDT) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-2fa0ce30ac2so2347097f8f.3; Wed, 19 Apr 2023 07:10:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681913447; x=1684505447; 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=JN1Y2bvJVpq6/q4dmcPnKZ0rBsOm/7Q8Ad5f4nAyRoc=; b=f/NYQCCsqeWWy9Uvb3yWG1Caz8gltv16j7yBtH/xXflWKOgXFY37WDGymS6Od3hJsi ubMqWgt37SIxIKuSFAPHr6M5uRWL7Y+Q5/gRZboVk0V1xu0cLdIH3/yzGhqhWLkjiL4f NRPKe4lhpJcGpN23p4+1LLs0jMRwexKbladBo/CO4NfWsv6vafvE2+AC5olvNTyCQZwq QrZLOVpf5uiI844DojBIGZC417SQppeooZVpPVoqtpnc3XPvHvfHuio/fOOyxG4GPuOQ aPeMY1axhEgx49OG8QDpYAIInCjaf8s2H52P+dPksGiUbOwsq6Gx2FbzqCXkfX5UHMiV AJBQ== X-Gm-Message-State: AAQBX9dNTyDlpacW2eMVv902ujj5BEFQHAhySg+mcB5jZvlg1FJzvWbe c0HCMW26D9Hq6VXAXpp2rZg= X-Google-Smtp-Source: AKy350Y02nCXtd9Ex2dTiMUqdMuZubY7+g/E9AAW5VIMPA7K0NU5P6NletE91Ad3MZoVtt3NEzGYVg== X-Received: by 2002:a5d:5546:0:b0:2f6:8ca4:a71e with SMTP id g6-20020a5d5546000000b002f68ca4a71emr4777763wrw.52.1681913447180; Wed, 19 Apr 2023 07:10:47 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 07:10:46 -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 12/19] zonefs: use __bio_add_page for adding single page to bio Date: Wed, 19 Apr 2023 16:09:22 +0200 Message-Id: <20230419140929.5924-13-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 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Johannes Thumshirn The zonefs superblock reading 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 Acked-by: Damien Le Moal --- fs/zonefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 23b8b299c64e..9350221abfc5 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -1128,7 +1128,7 @@ static int zonefs_read_super(struct super_block *sb) bio_init(&bio, sb->s_bdev, &bio_vec, 1, REQ_OP_READ); bio.bi_iter.bi_sector = 0; - bio_add_page(&bio, page, PAGE_SIZE, 0); + __bio_add_page(&bio, page, PAGE_SIZE, 0); ret = submit_bio_wait(&bio); if (ret)