Message ID | 20180509074830.16196-5-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 631B2602C2 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 9 May 2018 07:48:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5498B28E05 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 9 May 2018 07:48:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 493A028E08; Wed, 9 May 2018 07:48:55 +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 E327928E2B for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 9 May 2018 07:48:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2AD896B033A; Wed, 9 May 2018 03:48:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2340B6B033F; Wed, 9 May 2018 03:48:53 -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 0AFAE6B0340; Wed, 9 May 2018 03:48:53 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f72.google.com (mail-pl0-f72.google.com [209.85.160.72]) by kanga.kvack.org (Postfix) with ESMTP id B8E2B6B033A for <linux-mm@kvack.org>; Wed, 9 May 2018 03:48:52 -0400 (EDT) Received: by mail-pl0-f72.google.com with SMTP id h32-v6so3304430pld.15 for <linux-mm@kvack.org>; Wed, 09 May 2018 00:48: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=xb7WGETnuSglw9LZ4UmlKDIRDpd70b+kw5sw3noLaec=; b=NQnBop1BQ6CXhYS3sD8UX8kNlWqOTROIus4yDVAbaD44T2QZSkVYWKHrXKpWApEe+F QsvXGjjTerbSvV9MMexMdXn4hXbqnvY59/nIA4GuNNsTH4n/oO28ipPn3hpfqXOPZb6N TLLURZ230TURRw3FYo2/+39rCUdhMwCBCcM0nnS0K1QQfjc/Hod/HINwOqO45U0pTgX0 mciJjE3d4VQCJEX0I01rvco+U/5lfJRVc7lXZGCAwFMfKyM6Nau/inNpQeZPq20LaC4Z jAdVfwB+cNiP8ckUpBRoevuBqCiS8EHgSrfV/NxYXyJ3wyBqZRwWXrjJuoG+cuJq+e2p IXAw== X-Gm-Message-State: ALQs6tBtd+Vmjr/qPQ3ml4A7mHIhmDdsQ1k11xhJ7GKI8qK7AqTDp7Hk AZRjh2c0pvai7BmxaIp5Og7uRxEs7fW4jaXsr9Rb/lxb9NGqOUuNiHrpMbj+NituCdzQ+nQjEJC aMR6kVhAWBE785qBTcz3skCqfKavovQ/MctBS0uS3DU9GuPU7bT76IWpK8yM3Zyk= X-Received: by 10.98.206.78 with SMTP id y75mr42145245pfg.175.1525852132443; Wed, 09 May 2018 00:48:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrLFcxU83xBYIvx7cu1r9+Q3gEybBpESDqnlCKrEohi0obygK5Svq7LiszY/lQavqAo9tJq X-Received: by 10.98.206.78 with SMTP id y75mr42145219pfg.175.1525852131600; Wed, 09 May 2018 00:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525852131; cv=none; d=google.com; s=arc-20160816; b=H29PqJ+Q57Zh2Y4er0UFPziJ0dGIty1fxQb14OVdvPd9cjqm4DPUA73R5kWqLbB+k8 hkEd8Y4dI0L+z27LmN2PTCq2rra/oM6DSkR5vLjccxHOxamIiI3kot71/PTQxAyP3F+G dAkekUREsE6XiOSiSo3xoJwJxr6WQu9YSDIc5VloWQAL3jwZ4dmX268c4BQHB4NHhzuO SdQt3apqdr272lDzwLBtTmP4Lb18bSbujURTEige3eHiAQsLNFtVkQHXerWt/wW+JaoD LNuYzlQV27zy7vwZrltJbLusbWbN0Qv+vonk0ziClBWZwk42vJvmf+QqukjAOl1RtEnY l6Dg== 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=xb7WGETnuSglw9LZ4UmlKDIRDpd70b+kw5sw3noLaec=; b=pG0wjzSB5U1nKFP9bHVRssF7ehcPUkNFsYtjvZmddjzMZy6rTmU0bCx+zmvQol31r9 p1aX7M4VuKGuD2NDzi2P3eJJYHQOLQWdX1k1Hbk2l6PbkOBJit6+4Sda2n70OOoVHdfc 4ecgZIcX9zOYvQeQlr62nz8UPdjxzFr5T1+OvaXQqyZ3+/prRvs3LhQjrHY38LrBF2mm qvstZNR4TwBEaU9IqqaD+qZPYNm1imrodml8w4rpJlyFa51f3M4Se3AZS6G7diDFpHGE dP+qKMMrp45OqUnb4Tg+98gorohD7XXQfrz57TNWD/eEyE8MvZQ11ygdlw6x3CCbBGQr DLrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=ux4+79VJ; spf=pass (google.com: best guess record for domain of batv+e0efdd19ce80d487e3da+5372+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+e0efdd19ce80d487e3da+5372+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 31-v6si17942260pli.404.2018.05.09.00.48.51 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 00:48:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+e0efdd19ce80d487e3da+5372+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=ux4+79VJ; spf=pass (google.com: best guess record for domain of batv+e0efdd19ce80d487e3da+5372+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+e0efdd19ce80d487e3da+5372+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=xb7WGETnuSglw9LZ4UmlKDIRDpd70b+kw5sw3noLaec=; b=ux4+79VJdHDffyXZnKHexx13B YtLzWyuD/QUrJy86ZdRkypNOV63skbK1LBtHM1qmukMXlS+U/oIsmCYWIWGOozDvo05Qe+IMvFjgW CxSDiDGVVAh+k6caACyXHgA3F/+Sb5GiuesIzGiKibGcPXAhamUxGnT7lbQOfvR4vj97xnt0KdY88 QWhAS9hiPS7js2hhhuvqO+LVoBjNhYzLrk1j9S0W9jojRWYbZhDiqC+mLI06NkNf7Q/ZOeHIeC597 46XYee1ZiT7D1CKn14WlnuzIu35TRCX+Y/QsiouIxI97Y4JicFR127fYuxFlxYf6TfQ22yGDxtYej KUVjbDDzw==; Received: from 213-225-15-246.nat.highway.a1.net ([213.225.15.246] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGJqE-00018o-Dd; Wed, 09 May 2018 07:48:50 +0000 From: Christoph Hellwig <hch@lst.de> To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 04/33] fs: remove the buffer_unwritten check in page_seek_hole_data Date: Wed, 9 May 2018 09:48:01 +0200 Message-Id: <20180509074830.16196-5-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509074830.16196-1-hch@lst.de> References: <20180509074830.16196-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 |
diff --git a/fs/iomap.c b/fs/iomap.c index 13f518c7d3be..a739f3f995d9 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -610,14 +610,9 @@ page_seek_hole_data(struct page *page, loff_t lastoff, int whence) continue; /* - * Unwritten extents that have data in the page cache covering - * them can be identified by the BH_Unwritten state flag. - * Pages with multiple buffers might have a mix of holes, data - * and unwritten extents - any buffer with valid data in it - * should have BH_Uptodate flag set on it. + * Any buffer with valid data in it should have BH_Uptodate set. */ - - if ((buffer_unwritten(bh) || buffer_uptodate(bh)) == seek_data) + if (buffer_uptodate(bh) == seek_data) return lastoff; lastoff = offset;
We only call into this function through the iomap iterators, so we already know the buffer is unwritten. In addition to that we always require the uptodate flag that is ORed with the result anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/iomap.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)