From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D89D8C83F2B for ; Thu, 31 Aug 2023 07:21:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232741AbjHaHVf (ORCPT ); Thu, 31 Aug 2023 03:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230455AbjHaHVe (ORCPT ); Thu, 31 Aug 2023 03:21:34 -0400 Received: from out-245.mta0.migadu.com (out-245.mta0.migadu.com [91.218.175.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1964F1A3 for ; Thu, 31 Aug 2023 00:21:32 -0700 (PDT) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1693466094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LgfDUD9JxgKk0bOKrlX8A97Lfcy1zdSTIsO3Ef+Irq8=; b=uFnC/+7+D8DFe3uA+HDNBKNtTPnc4K9PHKGYfmxgN/OnXNuCUJUKklisT2ssOequlntqf7 kE5OIt+EhR7R3JGMyIoBAnAyT5ClJPL2kRmfHQqcLXZecAKLmTrTczRBTS3xOUsenQHSyX 0JHcJG6pZlRupddQsGT8QMOn6PmX2uk= Mime-Version: 1.0 Subject: Re: [PATCH 1/3] mm: use nth_page() in place of direct struct page manipulation. X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230830182753.55367-2-zi.yan@sent.com> Date: Thu, 31 Aug 2023 15:14:15 +0800 Cc: Linux-MM , LKML , linux-mips@vger.kernel.org, Andrew Morton , Thomas Bogendoerfer , "Matthew Wilcox (Oracle)" , David Hildenbrand , Mike Kravetz , "Mike Rapoport (IBM)" Content-Transfer-Encoding: 7bit Message-Id: References: <20230830182753.55367-1-zi.yan@sent.com> <20230830182753.55367-2-zi.yan@sent.com> To: Zi Yan X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org > On Aug 31, 2023, at 02:27, Zi Yan wrote: > > From: Zi Yan > > When dealing with hugetlb pages, manipulating struct page pointers > directly can get to wrong struct page, since struct page is not guaranteed > to be contiguous on SPARSEMEM without VMEMMAP. Use nth_page() to handle > it properly. > > Signed-off-by: Zi Yan Reviewed-by: Muchun Song Maybe 3 separate patches would be better for backporting purpose.