From mboxrd@z Thu Jan 1 00:00:00 1970 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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C65CC761A6 for ; Thu, 30 Mar 2023 10:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680173091; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ygCKmIBBdCpjacdqanGMo8plagp9DY+cm3XkvceMgx4=; b=KoPrbrSpQT6qxqsv3vDMbIJE4BCGfAHik+Qdpk5yGqjHmna7ZxuXLJ7W35Mv5+IX8Je0ik U3Ln9BtiFntZkeJnCgyaEXUVI4dtChBMDV8Z2Ddcob7Ib/ajNEqVj4x2sj93xeHqihiP5/ 7qiFTCQhNaIk4wbUVRmZGlYxifrBF64= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-74-xaRdhFM6Pr-KdY6iEVJTbw-1; Thu, 30 Mar 2023 06:44:50 -0400 X-MC-Unique: xaRdhFM6Pr-KdY6iEVJTbw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 16C8A185A790; Thu, 30 Mar 2023 10:44:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06285C15BA0; Thu, 30 Mar 2023 10:44:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EC94A194658F; Thu, 30 Mar 2023 10:44:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 52B301946587 for ; Thu, 30 Mar 2023 10:44:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 418A12166B33; Thu, 30 Mar 2023 10:44:45 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3AC782166B34 for ; Thu, 30 Mar 2023 10:44:45 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1A13B1C08795 for ; Thu, 30 Mar 2023 10:44:45 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-599-HY-4pn6zPsC13Gvcxzs8dA-13; Thu, 30 Mar 2023 06:44:42 -0400 X-MC-Unique: HY-4pn6zPsC13Gvcxzs8dA-13 X-IronPort-AV: E=Sophos;i="5.98,303,1673884800"; d="scan'208";a="338948152" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 Mar 2023 18:44:41 +0800 IronPort-SDR: j3PRi2juaz2zQ0YYBLmEMOIQfx9rHcFDvU5vdwVOJFWjUpc0HXCLkLE7rd9qn0HYpe5/r5e6AH ueT+t+x5U3BWvvvbdbxp5KqWa0WYZaN5NahP2YvKa0JwhWuf86aWUoqT8KeJx2+qdvSJhPR5Lq f1DZBi90c/B0oFlMjVIIOfZSzJcv/fIsxtjrR0adRcBKEZ+Wu+WL3w11CvLjxbvkI1fVFjVsVM QMIguHYOHal0+RBZnJHOO+5YshycarJkYhtlFdJvIdC/VglcSzS4VWNqTJciTCDAiKMc3N0/KY cVU= 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:55:08 -0700 IronPort-SDR: VYA9BgUUDr4sRMMfeFHmoTvJAnU8njSRM2w2NjoxJH3Cs70Kv8EJ/NbwobjN2EMuJHAYNPSu+2 Nv24R+meZtBuzWBLMI2rGIlIum+FZJ3DzLLEATptDFEbE2+Hak6NpQWmS1jl66KjmWQRpANrQO SJDRkUryKsiMGPqt9zUBSBJ1Bi1cbUurM7jtK569mscScXqA2oFbNgVwXqIwxlQ2MR+O4fo2VQ EV+jUSVXErWdsRYtr4iObYolOTAsYF/RWA3lThvvL1VeJ33ahhyJvlra7p2jf2qsTPNoO6Xbj7 kMw= 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:39 -0700 From: Johannes Thumshirn To: Jens Axboe Date: Thu, 30 Mar 2023 03:43:54 -0700 Message-Id: <1b1bdd842de5f699d76191565fb2b6659aa38922.1680172791.git.johannes.thumshirn@wdc.com> In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Subject: [dm-devel] [PATCH v2 12/19] zonefs: use __bio_add_page for adding single page to bio X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Kleikamp , jfs-discussion@lists.sourceforge.net, Song Liu , dm-devel@redhat.com, Christoph Hellwig , Andreas Gruenbacher , Damien Le Moal , Matthew Wilcox , cluster-devel@redhat.com, Chaitanya Kulkarni , Mike Snitzer , Ming Lei , linux-raid@vger.kernel.org, Bob Peterson , David Sterba , linux-block@vger.kernel.org, Damien Le Moal , linux-mm@kvack.org, Johannes Thumshirn , linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: wdc.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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) -- 2.39.2 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel