lkml.org 
[lkml]   [2024]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/11] mm/ksm: Convert stable_tree_search to use folio
On Wed, Mar 20, 2024 at 03:40:45PM +0800, alexs@kernel.org wrote:
> @@ -1820,28 +1820,30 @@ static struct page *stable_tree_search(struct page *page)
> struct rb_node *parent;
> struct ksm_stable_node *stable_node, *stable_node_dup, *stable_node_any;
> struct ksm_stable_node *page_node;
> + struct folio *folio;
>
> - page_node = page_stable_node(page);
> + folio = (struct folio *)page;

These casts make me nervous. Remember that we're heading towards a
future where struct page and struct folio don't point to the same
memory, and part of that will be finding all these casts and removing
them. Please, unless there's a good reason, just use page_folio().


\
 
 \ /
  Last update: 2024-05-27 15:56    [W:1.389 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site