From patchwork Thu Mar 30 10:43:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13193868 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 3B2D1C761A6 for ; Thu, 30 Mar 2023 10:44:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CCE51900006; Thu, 30 Mar 2023 06:44:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C2E9A900005; Thu, 30 Mar 2023 06:44:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF761900006; Thu, 30 Mar 2023 06:44:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9E409900005 for ; Thu, 30 Mar 2023 06:44:35 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 6E6724016D for ; Thu, 30 Mar 2023 10:44:35 +0000 (UTC) X-FDA: 80625230910.08.A7AC4A3 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by imf18.hostedemail.com (Postfix) with ESMTP id 462DC1C0005 for ; Thu, 30 Mar 2023 10:44:33 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=TQ1gRQEN; spf=pass (imf18.hostedemail.com: domain of "prvs=446327cdf=johannes.thumshirn@wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=446327cdf=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=1680173073; 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=oWxxzkupGP3zZ8EA8mimp1VOh/9W6PeHdnUpiZAKea0=; b=serxur7dNfkWBwqSw3+9RU1u0z/BIOym0EBWAFMdPgQFk+r1ryTloQZuaD05s9jU+R+Bt/ InwgT9h9otz1s4wYQSFvo5e8Nq2ByhLo2sDcNYtBcyrwFi3Z7dqPASekgxobGg9jjRrKZl M5vI37uOepoxOniYzirhmLWGoQHH/ag= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=TQ1gRQEN; spf=pass (imf18.hostedemail.com: domain of "prvs=446327cdf=johannes.thumshirn@wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=446327cdf=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680173073; a=rsa-sha256; cv=none; b=tCxiR4d3WJhPQkItJPkE6Ey7yvGxuCnoryhZM0Xid6WJEfqQt0G3Uj/n5m+lZOswfn5rcg J4LPTZpOaBF0DRb1zLNHGFLErhwqIIdtWpMMB8De6z/plAPN6ZpUq5YHMzM+y1t9gVmIuz JgCmhR78ieCv5Z5I8pMzT8G5c0rFBt0= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680173073; x=1711709073; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=losNsOzC/f7Y139Rf9MlNoUaYWQhJEhtWroEro9w4/M=; b=TQ1gRQENq70CaXPLg1PlX2mwgI5A5mGgYbRcs1Km3SA4ysoCiyG4OYKr hc9wOQwj/vHMvjq4KhfprXbV1VdF4KHEp+TCUyOIDNpit7hul7UJe4AJu 3Am79Q/ib1vUfHaVcmq9nkmPE1+W+ewzta5DfMVyeokmkMv1V+gN7H5aA GZuay4tra2Oc5BCcpiqk1JHNHkSfeX4H/J3FmoKkdaF/EytvXp6eElsFE dvvLMmXLlxUcGZAH0GnpiquGIwB4WUFd8hz/L8oUu//C8TNR2OmpRveb9 jqlQl33YSlVtjyaXo2DGDIk4+cmu3R1Gec/Ktjarlexi2yZYGcerNgMtH g==; X-IronPort-AV: E=Sophos;i="5.98,303,1673884800"; d="scan'208";a="231853928" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 Mar 2023 18:44:32 +0800 IronPort-SDR: jPulm7pFSJP89Onp5errLTGKKDD1oiZgDaHrxo4zmLVCgw0FX6T9NHtUk91a7DLJyXRLXDAf1C 2oB1r5FDGeZ9z0N7NWWH6LAx1jelsho1sghwsgZgy9BQYim3NAlbibDKFyQLte5qyi+EZ0bwGF qyVnC+fa5moDfCWsPv7RVbZUfCU5qZ98RbJ3aEBT74ZcepItgYy8d0z6ciCQz5GcbBaEM0+xoe yqJeeNHaEQuK0sT0xz+43ZIkIYx/Z5iIwE8Ruy5TcIzwnqnr3jr/o2AU9nV2OmTwTZZyNZPXcJ yzg= 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:54:59 -0700 IronPort-SDR: LLyR2Npm2+MAJM3XIZClgMxoi6I/W/dIVvFOaKwZbXR+FXU/hAizNCjpHL6vVJ53LRicCLvlw6 5vJSG8HqxBWOqmVv/563WgNcBAKcQrTbUaISiCtdAKhBTNUkKx21Cw/LpFv6nwsVXjwJUXttT1 Ouz87wSgGmy/lK21UBktPDa5DL8h2pGw5G6UoHn1GsKFWFrgaBgxcgxKAEyMdk+8OOry+WySWP 2F6SU6oJeDkTWv5KZR1md8qL0MPIRJYLz7AIbGmgoPFt1/WpjDzmEIsUXysP0EYjsW8qL4qhU5 Fe4= 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:30 -0700 From: Johannes Thumshirn To: Jens Axboe Cc: Christoph Hellwig , Hannes Reinecke , Chaitanya Kulkarni , Damien Le Moal , Ming Lei , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com, Song Liu , linux-raid@vger.kernel.org, Mike Snitzer , Matthew Wilcox , Dave Kleikamp , jfs-discussion@lists.sourceforge.net, cluster-devel@redhat.com, Bob Peterson , Andreas Gruenbacher , David Sterba , linux-btrfs@vger.kernel.org, Johannes Thumshirn , Damien Le Moal Subject: [PATCH v2 09/19] btrfs: raid56: use __bio_add_page to add single page Date: Thu, 30 Mar 2023 03:43:51 -0700 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Stat-Signature: bupyehspnfwb8qbapckx7enfdwi93q4a X-Rspam-User: X-Rspamd-Queue-Id: 462DC1C0005 X-Rspamd-Server: rspam06 X-HE-Tag: 1680173073-926231 X-HE-Meta: U2FsdGVkX18HqwFOyWtLl3ZzwWkDHWYf1N4psnbnYvZYtZxIQMnURJLRi+G3zmi8Wyohn/k6yBYfLK69ur15E9FbvbC+fgaOnR1LnXh9Fv3OgnmT0F/DKnYx8KTwzctv5yI88qme9Zv7SsjZXQPJIE/KqEMKRBaSO/m0n0rpSuvBPpEjyNgphktd7cgEWhmOhv6cSc5uD/DH7H2c7AlTyx6K95UEblVjbw8OiQlAMlfVodReWX2/Kwh8AT7B6cb1dKNJhV4YKwZewF7xM+arEuAqTJ9BQyaiad3Ra/4UXaCuFW3VLVHtT+TJcruwm4sdHPWRZgzSPyPcKSZB25Ml8wfP+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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: The btrfs raid58 sector 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 --- fs/btrfs/raid56.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 642828c1b299..c8173e003df6 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -1108,7 +1108,7 @@ static int rbio_add_io_sector(struct btrfs_raid_bio *rbio, bio->bi_iter.bi_sector = disk_start >> 9; bio->bi_private = rbio; - bio_add_page(bio, sector->page, sectorsize, sector->pgoff); + __bio_add_page(bio, sector->page, sectorsize, sector->pgoff); bio_list_add(bio_list, bio); return 0; }