Message ID | 84ff2dcbe81b258a73ad900adb5266e208b61a4d.1685532726.git.johannes.thumshirn@wdc.com (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 C148AC77B7A for <linux-mm@archiver.kernel.org>; Wed, 31 May 2023 11:51:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6478C6B008C; Wed, 31 May 2023 07:51:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F7C68E0002; Wed, 31 May 2023 07:51:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4994E6B0093; Wed, 31 May 2023 07:51:09 -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 3CE286B008C for <linux-mm@kvack.org>; Wed, 31 May 2023 07:51:09 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id EE05EC0371 for <linux-mm@kvack.org>; Wed, 31 May 2023 11:51:08 +0000 (UTC) X-FDA: 80850384216.15.6012485 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by imf29.hostedemail.com (Postfix) with ESMTP id BC595120023 for <linux-mm@kvack.org>; Wed, 31 May 2023 11:51:06 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=fzi2jXDR; dmarc=pass (policy=quarantine) header.from=wdc.com; spf=pass (imf29.hostedemail.com: domain of "prvs=508ef2a02=johannes.thumshirn@wdc.com" designates 216.71.154.42 as permitted sender) smtp.mailfrom="prvs=508ef2a02=johannes.thumshirn@wdc.com" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685533867; a=rsa-sha256; cv=none; b=phyWBM5Q2EDgwiqZiKhovT9LK5H2WEN9cSruYuaMFtAp/4p0ucsnLeTcFtr4bPCiMCY+rf gqMhx4kofFjSknBgiBi6YWbYJZoOEthsf2HxV4MtvdFZ9AyvmS7kJOCJ5/EWQEpi7q2Oav NwT5yn0lCrl7ZyNRSVFPT8WzLPAKKG4= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=fzi2jXDR; dmarc=pass (policy=quarantine) header.from=wdc.com; spf=pass (imf29.hostedemail.com: domain of "prvs=508ef2a02=johannes.thumshirn@wdc.com" designates 216.71.154.42 as permitted sender) smtp.mailfrom="prvs=508ef2a02=johannes.thumshirn@wdc.com" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685533867; 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=2z8ePqOkMA02EjZtFm9zjlDNrusgnozPxjGO1q3xLaI=; b=5hYW2weFXYQ8Qs5ICv2vbJZUcASm+vYlK7lvRIRTVaYMC1SgNlmgnnhnpMEPKz4P8AdFll Zp5q7ef6pwkaosNTqta3nXYIqBahZ9UEWhJRi2aIesP6Jfe6tzs+A50MMg/PWaHg6qc/Wl xBVHUtrwK3+lpam8PxTCnEsG0LsBAWw= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1685533866; x=1717069866; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9z6+zwuzCmTIb11KkYmr2yz2BxhQ+erlThVzksd2pAs=; b=fzi2jXDR94otJDUaPZWpl7TNvp0G8Y//w0ZjkEbS2EwfPKIgawXDfPRD 6YFYIqhucfK+bwaM1F9LiItpI4KQ9325/53E2BHot8jQsR/71pUNC1dYy NQy+RN4qwDjp6HUAyNeZRBys21UrkcdUQeg9e54zR/fY5xkcADJ89yn51 tTk03KdzIwEc4+NN59uxAQOwycYl8aaYGwcoF+syDXXEs4sWo3dqLY5XZ W3bxRnpF9lSPWjKYdFTzOWMI8CVfKmJK3tGi/bhXarZjaquWWjuoL7s6r UBXKBM87+fE0pvQbHB9yng+ykbNx2M/JOolMQBtmVvB1GUkaGQnQ6t+wm g==; X-IronPort-AV: E=Sophos;i="6.00,207,1681142400"; d="scan'208";a="230207403" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 31 May 2023 19:51:06 +0800 IronPort-SDR: KMpp1yET9nV1QcTVbGrLIKQI4ffB5ouQTabx/riKKOYF5thh73NQGa8AyLyVZrWcAuNbRfjkEy ZvfCU2KLPlQu0ybPuxjfyT4QT+VQY4b1qmKKpFmBmmrRygufW/TPXb8iY+gW/KSUbsL0clfjRR 3EkDW8fRBN2m6esPpsyWSxw+Tgt7Ckac2nbM8h+B2e5ZIHR7at3Zzrdr8chptPecyoKh0SYIqA 3BWLQDGx/woxHuEeNAV3vHH1GszpPuEh4ekdyDTc5cBT5HDDWh56/YvfX1r1hbJYdfI3KqgBpq pQ8= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 31 May 2023 04:05:58 -0700 IronPort-SDR: DCUoJnFdqTpXehtn1JwgjSv3UPX1uRxp333BvBFifFTfBv7OlO2CSbLrKRyVZ1ZVcgiosXtY0T tVsCFtk92PhOFdpXCSWvnqSTCBvF5UVLxocOGAcoZEQFEIu1gOajsi/mvqMWu8cMF5J6hkw4hM 5eCUuV+nUJWEQNxIZoJ/kpCJ15t9r2ZraltnxO2/iRT8ytXvXYLujM0u5SnxD1uxOurCUrxHMR wO24NKfN/B2SA63R841MABC0LQn3WFoG2ot/EyIEOWiHlgSgUeAes2WB25guvYTGVgT3jm/xuQ aSE= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip02.wdc.com with ESMTP; 31 May 2023 04:51:02 -0700 From: Johannes Thumshirn <johannes.thumshirn@wdc.com> To: Jens Axboe <axboe@kernel.dk> Cc: Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>, Chaitanya Kulkarni <kch@nvidia.com>, Damien Le Moal <damien.lemoal@wdc.com>, Ming Lei <ming.lei@redhat.com>, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com, Song Liu <song@kernel.org>, linux-raid@vger.kernel.org, Mike Snitzer <snitzer@kernel.org>, Matthew Wilcox <willy@infradead.org>, Dave Kleikamp <shaggy@kernel.org>, jfs-discussion@lists.sourceforge.net, cluster-devel@redhat.com, Bob Peterson <rpeterso@redhat.com>, Andreas Gruenbacher <agruenba@redhat.com>, Mikulas Patocka <mpatocka@redhat.com>, gouha7@uniontech.com, Johannes Thumshirn <johannes.thumshirn@wdc.com>, Gou Hao <gouhao@uniontech.com>, Damien Le Moal <damien.lemoal@opensource.wdc.com> Subject: [PATCH v7 04/20] fs: buffer: use __bio_add_page to add single page to bio Date: Wed, 31 May 2023 04:50:27 -0700 Message-Id: <84ff2dcbe81b258a73ad900adb5266e208b61a4d.1685532726.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <cover.1685532726.git.johannes.thumshirn@wdc.com> References: <cover.1685532726.git.johannes.thumshirn@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: BC595120023 X-Stat-Signature: qmecjudw1apemd694dix4iy7ez7fk5at X-H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z83c/xPwge4rb6B71M5T9Y/uGn5VyFGRdDrjmA6j2DeDqKBJj09FbXeRPCVeEIASOpLO5HYBVs8B/XNXwlITwgdTrxaUF4MZaGSIkY3nxZC0x8BKEHVz+1Y2LNch+2n19RK4R6ZPRNRGgmCASjlf46Wj8+tiNsviN2X0LrJzOeom+Z1FyfsNfJm56dT7dDziPdSXkEHRa2QjrFC6sM999m8h2zvMNLBUBpx41nbCZwviOnKC3ZelvRZ+s0JHZFwTB24HVNcZYRXVZ+MEwgT9dVwBUsLH2g43GZI8WE4lwwzw8f/pzv2EZz7WmtbJGOOfl7sAOy+zUJtW6iRd1mUVmFNGv5VK4rhkyV4KES8/D7ps/HKcwFlTt+6uUJW98SyQyrVzmGO1nX3vDYu2sL6E= 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/fs/buffer.c b/fs/buffer.c index a7fc561758b1..63da30ce946a 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2760,8 +2760,7 @@ static void submit_bh_wbc(blk_opf_t opf, struct buffer_head *bh, bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); - bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh)); - BUG_ON(bio->bi_iter.bi_size != bh->b_size); + __bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh)); bio->bi_end_io = end_bio_bh_io_sync; bio->bi_private = bh;