lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <540ba658-bfc0-480e-86ae-fbb42a68476f@amd.com>
Date: Wed, 12 Feb 2025 10:49:32 +0530
From: Shivank Garg <shivankg@....com>
To: Liu Ye <liuye@...inos.cn>, brauner@...nel.org, dhowells@...hat.com,
 akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/2] mm/folio_queue: Delete __folio_order and use
 folio_order directly

On 2/12/2025 8:28 AM, Liu Ye wrote:
> __folio_order is the same as folio_order, remove __folio_order and then
> just include mm.h and use folio_order directly.
> 
> Signed-off-by: Liu Ye <liuye@...inos.cn>
> ---
>  include/linux/folio_queue.h | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/include/linux/folio_queue.h b/include/linux/folio_queue.h
> index 4d3f8074c137..45ad2408a80c 100644
> --- a/include/linux/folio_queue.h
> +++ b/include/linux/folio_queue.h
> @@ -15,6 +15,7 @@
>  #define _LINUX_FOLIO_QUEUE_H
>  
>  #include <linux/pagevec.h>
> +#include <linux/mm.h>
>  
>  /*
>   * Segment in a queue of running buffers.  Each segment can hold a number of
> @@ -216,13 +217,6 @@ static inline void folioq_unmark3(struct folio_queue *folioq, unsigned int slot)
>  	clear_bit(slot, &folioq->marks3);
>  }
>  
> -static inline unsigned int __folio_order(struct folio *folio)
> -{
> -	if (!folio_test_large(folio))
> -		return 0;
> -	return folio->_flags_1 & 0xff;
> -}
> -
>  /**
>   * folioq_append: Add a folio to a folio queue segment
>   * @folioq: The segment to add to
> @@ -241,7 +235,7 @@ static inline unsigned int folioq_append(struct folio_queue *folioq, struct foli
>  	unsigned int slot = folioq->vec.nr++;
>  
>  	folioq->vec.folios[slot] = folio;
> -	folioq->orders[slot] = __folio_order(folio);
> +	folioq->orders[slot] = folio_order(folio);
>  	return slot;
>  }
>  
> @@ -263,7 +257,7 @@ static inline unsigned int folioq_append_mark(struct folio_queue *folioq, struct
>  	unsigned int slot = folioq->vec.nr++;
>  
>  	folioq->vec.folios[slot] = folio;
> -	folioq->orders[slot] = __folio_order(folio);
> +	folioq->orders[slot] = folio_order(folio);
>  	folioq_mark(folioq, slot);
>  	return slot;
>  }


Reviewed-by: Shivank Garg <shivankg@....com>

Thanks,
Shivank

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ