Re: [PATCH 06/12] mempolicy trivia: use pgoff_t in shared mempolicy tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 25, 2023 at 01:28:14AM -0700, Hugh Dickins wrote:
> Prefer the more explicit "pgoff_t" to "unsigned long" when dealing with
> a shared mempolicy tree.  Delete confusing comment about pseudo mm vmas.

Yes, with three quibbles

>  struct sp_node {
>  	struct rb_node nd;
> -	unsigned long start, end;
> +	pgoff_t start, end;
>  	struct mempolicy *policy;
>  };
> -
>  struct shared_policy {

Did you intend to delete the blank line between these two structs?
That's not our normal style.

> +++ b/mm/mempolicy.c
> @@ -2444,7 +2444,7 @@ bool __mpol_equal(struct mempolicy *a, struct mempolicy *b)
>   * reading or for writing
>   */
>  static struct sp_node *
> -sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end)
> +sp_lookup(struct shared_policy *sp, pgoff_t start, pgoff_t end)

While you're reformatting anyway, mind joining these two lines?

> @@ -2499,7 +2499,7 @@ static void sp_insert(struct shared_policy *sp, struct sp_node *new)
>  
>  /* Find shared policy intersecting idx */
>  struct mempolicy *
> -mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx)
> +mpol_shared_policy_lookup(struct shared_policy *sp, pgoff_t idx)

Ditto





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux