Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9563065ybi; Wed, 10 Jul 2019 12:30:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPmxbJJGx1XCduJBBh5SEXR3Ws/7oaNv2VwwlLhLeQNoXzPb3Ijm8qx8A7jzK/kJcfOCZL X-Received: by 2002:a17:90a:db42:: with SMTP id u2mr36265pjx.48.1562787017430; Wed, 10 Jul 2019 12:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562787017; cv=none; d=google.com; s=arc-20160816; b=zCZzneZ6MVAtaUO8oOTOWQqqwXc5cbdcaZNv+X4vOlLj7+18r+qaRNSPXWAxL4baSU 6taIPK9SlDYCq7Ebo+q0ARQqNdKdyxGTUAlIytS6KE4+nZZ+oMIajzYxnjtA2Kni0uSm JpbCjvuLMM/uRxseKhHFYg1cAqOX2ahuaXGi/tC0oW1QWywKlSyN29Jf86GcBoChlsyc WJ6+CCvSgf62qCLNUFdWMgby/bK9jO7hsVZ+iAGxZWbcpCQD+xmo231MXwTfMaWZaQ17 qedirSDpk9F3UKfLGucGMfhcNy+LRpSeVVlmTskLoEVudDkplbd/S/AsqdbruItkrrXQ C40Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7bt3uTjdvwOxCSrbgXPGxceLQgj9AhCnSmWTiQF3lg0=; b=KCuH3W/glnrs1FumnatQFftDbDsyzVqr0ZlEm1MExTWxbNkrwce+cBiz2winNbRvlC +4wxlV/8RCBAIeNESHxKxNkSnLUsi+DEDbUkBggknZeb2BwO+tVr+d6hflNal8lPmbCz BClblR8HYyi5sbG+PpEaOjpsKDPLtw6Qyrmcil6haoCzOlXypO+SDh0ONTfh5jD68srn zWBWmvsVAdG3/OHL1fZ7luOb90PZPNR6sO+4J00kykdmCSj0Weu8rfz3rIpHdhIV7d3i bP5hfTclnfFPiiqspmyYxyvyJJ1suipcbCnYFhDpBA2eWK5ANO8b4a3tvkpyW3JiIynR d3fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Xpz1OWs0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e24si2878740pgh.408.2019.07.10.12.30.01; Wed, 10 Jul 2019 12:30:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Xpz1OWs0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728130AbfGJRwt (ORCPT + 99 others); Wed, 10 Jul 2019 13:52:49 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:37095 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727427AbfGJRws (ORCPT ); Wed, 10 Jul 2019 13:52:48 -0400 Received: by mail-pl1-f193.google.com with SMTP id b3so1593748plr.4 for ; Wed, 10 Jul 2019 10:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7bt3uTjdvwOxCSrbgXPGxceLQgj9AhCnSmWTiQF3lg0=; b=Xpz1OWs0EPOn58mLkWBhZPj0ilFyo38+TfIG0u4B64TO0IAg54S4ECVhLPLqe5gbPe 1s93oq/MKLVtxFowoz2+aHvKEm2fHJ8Tigl0xgfhA3FDHMqFZg/s9JnhG+wQLAR2Vx+6 fcohSx5C7M09X1g6P6Twd8Cy4kZkCcCKt2IU/24708FAyvj3PfD0Ub/5a4A/wbuKyToK QBnxwi9ZmcZfjz+WHd7qCq72ElHe8xjDGZ1c4HbYZm19EGIi3B7SaEoanabZ2iECkcAq TXKx8JaVZzClM9BTtaLtgNRUzbC15I+jMzBYKKFjQdwLBYieC0O552wi/1Aste4d+RiJ tJUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7bt3uTjdvwOxCSrbgXPGxceLQgj9AhCnSmWTiQF3lg0=; b=Yi7jC84TGSs3nhXheCKfkn91KhX/kW+RnEh2V8p/2JfH1bxUEm3It5peD94V+smsTM KQiFIqbFaRs3KOGdOGwmGMcwZaL1pTbfTjEKZQWDNvfESq7BouC2vHbzbjxLlZWYZChc JUnOEpg0jQfAxErgekt3MUraP7ctVnm50Tueuv4KlMBfeGkbrkiLp024V3JW2+ZrDHjr 2tkrLlkvw2kIEKfzPTZPN4Xe9oYKs2tnj7Z+8HTHh0o8ukNwytkYHOGi5wPo11DFiMJi AFWBBnfRwyUoD029FoJdsmpreBhYQp0cjPBpseqeAv0h3DhjBYvl3xrn/+Mwm87Hu0ti 5r5g== X-Gm-Message-State: APjAAAWbRF5RQjEQk3gmC17xwUwuleCEWZ6Gw1J3VWG1ME7vK+DCcuB2 z6dUTe3qRmiqjfHM+3OEnCsb8g== X-Received: by 2002:a17:902:24c:: with SMTP id 70mr40140076plc.2.1562781168363; Wed, 10 Jul 2019 10:52:48 -0700 (PDT) Received: from localhost ([2620:10d:c091:500::2:5b9d]) by smtp.gmail.com with ESMTPSA id b3sm6722337pfp.65.2019.07.10.10.52.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 10:52:47 -0700 (PDT) Date: Wed, 10 Jul 2019 13:52:45 -0400 From: Johannes Weiner To: Song Liu Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, matthew.wilcox@oracle.com, kirill.shutemov@linux.intel.com, kernel-team@fb.com, william.kucharski@oracle.com, akpm@linux-foundation.org, hdanton@sina.com Subject: Re: [PATCH v9 2/6] filemap: update offset check in filemap_fault() Message-ID: <20190710175245.GC11197@cmpxchg.org> References: <20190625001246.685563-1-songliubraving@fb.com> <20190625001246.685563-3-songliubraving@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190625001246.685563-3-songliubraving@fb.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 24, 2019 at 05:12:42PM -0700, Song Liu wrote: > With THP, current check of offset: > > VM_BUG_ON_PAGE(page->index != offset, page); > > is no longer accurate. Update it to: > > VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page); > > Acked-by: Rik van Riel > Signed-off-by: Song Liu Acked-by: Johannes Weiner