Re: [PATCH 1/5] mm/madvise: remove the visitor pattern and thread anon_vma state

From: Lorenzo Stoakes
Date: Fri Jun 20 2025 - 01:11:15 EST


On Fri, Jun 20, 2025 at 10:43:30AM +0800, Lance Yang wrote:
> Would this be clearer and more closely describe the code's logic?
>
> /* Reject naming for regular file-backed mappings. */

Yeah here's the fun of 'anonymous' being super unclear :) it's like the 'no
true Scotsman' fallacy in mm form... ;)

'Anonymous, no really really anonymous, not even file-backed' :P

it's a good point but I'd rather keep this as close to the original as
possible so it's just a code _move_. Perhaps we can update later but I
think the context makes clear what is meant here at least.

>
>
> > > + /* Only anonymous mappings can be named */
> > > + if (vma->vm_file && !vma_is_anon_shmem(vma))
> > > + return -EBADF;
> > > + break;
> > > }
>
>
> Thanks,
> Lance
>