Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1031279imu; Thu, 22 Nov 2018 09:02:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/UuIBZMtuEAMR4wACOMSOZ73qUtDJppRYyAS5xCl80/EWhZG5tr7cTWpN21ltxlWafGqkq4 X-Received: by 2002:a17:902:8346:: with SMTP id z6mr11970381pln.340.1542906127923; Thu, 22 Nov 2018 09:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542906127; cv=none; d=google.com; s=arc-20160816; b=ap4BItOw3U1zXATsqzQEpm1yU8awESv6YYY8tEYnql1rpl4a/O/DNWfa8VIHb+LSWu +Au6zL3Qp9sbNuCPYUGs/558tVZU+tm0WfU4VO/+OR4uEz7ajvFluc2E/nFmzYOhHc35 0dTGG6yn7PQBNN0n+VCYCD5ZsysFc3UiIB1QfVLJBpjuYa6KhgWkgVHj+xxoy+bkXz8V OoTv0v7Th9lksAxV/+tIzmbEkDk0/KKyjgGpTKd6IaycUKcYs1iePkQRoRY8pWSO75yt jkUtC0xWsPYafZ1l0J5ktdylVKyZ7AubJrqpBpCuihIiJyg6p2D2olR7xiBh38g1X/xV TYfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=G4hita7BL5aEMQ4ZPsEZGQ57sefjnmPUHBhir/Gz8Tw=; b=D4H/rDxvqPxY/SkiIRx03CwSkbRKtezmFbSF6cqOko6ERvqyCIpfXW5/iaOcd7pCYT DeO0XJkKj/0EMv+PV2Q0pHEd30iLPGuFdE7RbT6afYJ4eef3qfNBU+KehL3WT9PCFiS5 fcvL35GbYqw9cxLHHo0HmE5ir1XnosTjOoaM66hvkTWEAaaAmQm1ad8Btuy/TIzABVD4 cgQa+NpGt2/FToCbd6DkrdFb5ZOcM8ecHQh8o1w8esOpyoSFtMyDAGif8FjHH4EawNxS oyHgIUdBNEkOFm2LrlnqPsavWdRltVUtQN8DijoToegHA/6HqGB6fWU6wpoYCGD1I+uh g1MQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si22556200pln.368.2018.11.22.09.01.52; Thu, 22 Nov 2018 09:02:07 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392081AbeKVPjl (ORCPT + 99 others); Thu, 22 Nov 2018 10:39:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59712 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732537AbeKVPjl (ORCPT ); Thu, 22 Nov 2018 10:39:41 -0500 Received: from localhost.localdomain (c-24-6-170-16.hsd1.ca.comcast.net [24.6.170.16]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E013AA92; Thu, 22 Nov 2018 05:02:00 +0000 (UTC) Date: Wed, 21 Nov 2018 21:01:59 -0800 From: Andrew Morton To: Yu Zhao Cc: Hugh Dickins , Matthew Wilcox , stable@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm: use swp_offset as key in shmem_replace_page() Message-Id: <20181121210159.3a5fb6946e460c561fdec391@linux-foundation.org> In-Reply-To: <20181121215442.138545-1-yuzhao@google.com> References: <20181119010924.177177-1-yuzhao@google.com> <20181121215442.138545-1-yuzhao@google.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Nov 2018 14:54:42 -0700 Yu Zhao wrote: > We changed key of swap cache tree from swp_entry_t.val to > swp_offset. Need to do so in shmem_replace_page() as well. What are the user-visible effects of this change? > Fixes: f6ab1f7f6b2d ("mm, swap: use offset of swap entry as key of swap cache") > Cc: stable@vger.kernel.org # v4.9+ Please always provide the user-impact information when fixing bugs. This becomes especially important when proposing -stable backporting. Hugh said : shmem_replace_page() has been wrong since the day I wrote it: good : enough to work on swap "type" 0, which is all most people ever use : (especially those few who need shmem_replace_page() at all), but broken : once there are any non-0 swp_type bits set in the higher order bits. but we still don't have a description of "broken". Thanks.