Message ID | 20180530095813.31245-9-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 83A94602CC for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 30 May 2018 09:58:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72C8D2818E for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 30 May 2018 09:58:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67869288F4; Wed, 30 May 2018 09:58:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E09482818E for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 30 May 2018 09:58:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B34286B026D; Wed, 30 May 2018 05:58:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AE0376B026E; Wed, 30 May 2018 05:58:52 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 980846B026F; Wed, 30 May 2018 05:58:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 5841A6B026D for <linux-mm@kvack.org>; Wed, 30 May 2018 05:58:52 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id y26-v6so977199pfn.14 for <linux-mm@kvack.org>; Wed, 30 May 2018 02:58:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=GliZSORTCqPgk+DB6OD2He41QJyhHCWCFJfok88IJWU=; b=RVORsDBh4XFBpM6Dg80Q1SSchybdJ+QeXACj9v2LRaxtPfHbSrsM1gNBKtKwxF2DZS H7ISRLbRPThk5w9Zpvs8w3BdrVVpav9qpo/cRSlHJ1i5k7VceRNBUofZvrjnvSgEDfme 0Vl1kUxPmJ1hCG+PSjVnjg4+/j1gAqSXsBO6rqGtRG6iFg1KYF9RBPQVI+pSo30ZKm0A LS4dBZ1aQoVsCwZ3UHpS8zodjk5mEjgC3yNgwFu4NR2Dj95mFer2EKadzDJl7XVsJA5T rt/IcPurx6akgGnMN1sBjnpL2Q7iupvrO3Bqf6TC9KZaycH3p4RRhooKYmHBjzEOyFGQ lhpA== X-Gm-Message-State: ALKqPwdM2I6G6m1zk712gxUsCJkHe3tE3WpCodNacdPwVak0As0XAjpL dmQdfZ4TaCEY3FA7cEcC29jhaoFLf/77UAXqi8DRCGX3xarfDbX9sp1w+mN1Dod1pemKRwxLpRN iPVXYbXkywHyp34CCna0mfCwzI5AEW//JQp3FBfN5xLoed6tpeCsd1yGbbSsRzQY= X-Received: by 2002:a63:2a11:: with SMTP id q17-v6mr1379355pgq.60.1527674332052; Wed, 30 May 2018 02:58:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ3uiH6bLvhuS1oQpiCDDtUkhnku/tebz6enjbIfh6q59M08GPPDHZSKu3HZa9AbtenYYoj X-Received: by 2002:a63:2a11:: with SMTP id q17-v6mr1379344pgq.60.1527674331418; Wed, 30 May 2018 02:58:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527674331; cv=none; d=google.com; s=arc-20160816; b=jFaftFGoo62oo1gM8hldCOlJBkdP0p2kZu1pYJ2VvGcQmT/83QhBIy/Ym0Z+jUz0YF tc7XBF3GYT97k7aqjL9cSefAvpjoUiob3+mgB0wyouv61RNlYppQ8ZJqj7GhOMC+eiDM Dmz/K8YszaoF71PwdDbXciJ/hVjSdg5Ib0ZKHCefoCcbjvhfvhEFvKnOGFj3px0Hk3Pe dZRr7z+oIF8qdcbfegTSL5xgLYjMQW1EIeKHeVkEBSirKRE1Ak8o6KtBPtheWnsAgZEu ViosAac7li5gizqk0EcaqvplhNwCCQFgOfPRMFutE4EzEk+7CLUDS8ZdKfDRg7670X0v 8zmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=GliZSORTCqPgk+DB6OD2He41QJyhHCWCFJfok88IJWU=; b=etmf4oLKE1F2dJq28BGi27LImHTe4vTq1ae0hGWSZv+4bzWPvGqNjw71jNNpGrcz9V NakefuikeD+KkyBBMD4B7zvRi99rrup0CznIitVwNMT+jZZHXKIV9tr12tyLXVftfpor HUd1Oif3q/0ihvmkELkGxBel3I2y5VdY9ARnrVLMoq6SZTbpUaLw34ZEYSk/mCDOqYM7 Q+wBdTfIObkG5+NhUuGzWbf/NJZrwj3Z5MxijSl+y/MfA5KKn9UK9vimoyiS517SaZ+o iemoQCu99+jWRxA9RZI18ljAonPZ8atdSMfVNQV+Vsww9/VEG/ccDhz7yZe780YzF+5P 3/OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=h7xSNvgK; spf=pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id u198-v6si15072932pgb.136.2018.05.30.02.58.51 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 02:58:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=h7xSNvgK; spf=pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GliZSORTCqPgk+DB6OD2He41QJyhHCWCFJfok88IJWU=; b=h7xSNvgKQXByGHpNhHyUwuEQX 6ExUGlWWqAWe4o5KPd8VHJRdf66MIPoScSLa9fg4AsBiHU1lgY2G/Ndw6FSsy9nw5MqSZiSGYpdZX i0X7+x7Q598eToJrJY4Fhk/5ZtJ0ROyRx5OfQe19XxcbvNrnkVlvG0Bi99p2JRKqygsV8U3UBpO9G 0nOjV3p7beH+G/+AJOe7k/tUeOnV24+rVJVGMQsyChiuAbuf0n2PGKVYigeHTRhrBwvx7b90McTz9 GXp4Pwbcix3DcGLzaXGT5jOcDTyEBy3DO9/titSCIvOkH27hOxnX0jDn3F7axQflj8cWmo4O3DGNL OeHrD2fDA==; Received: from 213-225-38-123.nat.highway.a1.net ([213.225.38.123] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNxsY-0006X3-9O; Wed, 30 May 2018 09:58:50 +0000 From: Christoph Hellwig <hch@lst.de> To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 08/13] iomap: use __bio_add_page in iomap_dio_zero Date: Wed, 30 May 2018 11:58:08 +0200 Message-Id: <20180530095813.31245-9-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180530095813.31245-1-hch@lst.de> References: <20180530095813.31245-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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> X-Virus-Scanned: ClamAV using ClamSMTP |
On Wed, May 30, 2018 at 11:58:08AM +0200, Christoph Hellwig wrote: > We don't need any merging logic, and this also replaces a BUG_ON with a > WARN_ON_ONCE inside __bio_add_page for the impossible overflow condition. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> looks good. Reviewed-by: Dave Chinner <dchinner@redhat.com>
diff --git a/fs/iomap.c b/fs/iomap.c index df2652b0d85d..85901b449146 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -845,8 +845,7 @@ iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos, bio->bi_end_io = iomap_dio_bio_end_io; get_page(page); - if (bio_add_page(bio, page, len, 0) != len) - BUG(); + __bio_add_page(bio, page, len, 0); bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_SYNC | REQ_IDLE); atomic_inc(&dio->ref);