Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()

2024-05-07 Thread Jarkko Sakkinen
On Mon May 6, 2024 at 7:07 PM EEST, Rick Edgecombe wrote: > Recently the get_unmapped_area() pointer on mm_struct was removed in > favor of direct callable function that can determines which of two > handlers to call based on an mm flag. This function, > mm_get_unmapped_area(), checks the flag of t

Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()

2024-05-07 Thread Liam R. Howlett
* Edgecombe, Rick P [240507 09:51]: > On Mon, 2024-05-06 at 12:32 -0400, Liam R. Howlett wrote: > > > > I like this patch. > > Thanks for taking a look. > > > > > I think the context of current->mm is implied. IOW, could we call it > > get_unmapped_area() instead?  There are other functions to

Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()

2024-05-07 Thread Edgecombe, Rick P
On Mon, 2024-05-06 at 09:18 -0700, Christoph Hellwig wrote: > > On Mon, May 06, 2024 at 09:07:47AM -0700, Rick Edgecombe wrote: > > > > if (flags & MAP_FIXED) { > > > > /* Ok, don't mess with it. */ > > > > -   return mm_get_unmapped_area(current->mm, NULL, > > >

Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()

2024-05-07 Thread Edgecombe, Rick P
On Mon, 2024-05-06 at 12:32 -0400, Liam R. Howlett wrote: > > I like this patch. Thanks for taking a look. > > I think the context of current->mm is implied. IOW, could we call it > get_unmapped_area() instead?  There are other functions today that use > current->mm that don't start with curren

Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()

2024-05-06 Thread Liam R. Howlett
* Rick Edgecombe [240506 12:08]: > Recently the get_unmapped_area() pointer on mm_struct was removed in > favor of direct callable function that can determines which of two > handlers to call based on an mm flag. This function, > mm_get_unmapped_area(), checks the flag of the mm passed as an argum

Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()

2024-05-06 Thread Christoph Hellwig
On Mon, May 06, 2024 at 09:07:47AM -0700, Rick Edgecombe wrote: > if (flags & MAP_FIXED) { > /* Ok, don't mess with it. */ > - return mm_get_unmapped_area(current->mm, NULL, orig_addr, len, > pgoff, flags); > + return current_get_unmapped_area(NULL, orig

[PATCH] mm: Remove mm argument from mm_get_unmapped_area()

2024-05-06 Thread Rick Edgecombe
Recently the get_unmapped_area() pointer on mm_struct was removed in favor of direct callable function that can determines which of two handlers to call based on an mm flag. This function, mm_get_unmapped_area(), checks the flag of the mm passed as an argument. Dan Williams pointed out (see link)