Re: [PATCH v3 1/3] kernfs: remove page_mkwrite() from vm_operations_struct

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

 



On 2024-07-04 11:02, Matthew Wilcox wrote:> Seems to me we should actually _handle_ that, not do something wrong.
> eg:
> 
>         if (vma->vm_ops) {
>                 if (vma->vm_ops->close)
>                         goto out_put;
>                 if (WARN_ON(vma->vm_ops->page_mkwrite))
>                         goto out_put;
>         }

Good point.

> or maybe this doesn't need to be a WARN at all?  After all, there
> isn't one for having a ->close method, so why is page_mkwrite special?

Hmm yeah, they should probably be treated the same.

Maybe ->close should be converted to WARN as well? It would be easier to
catch an error this way than chasing the EINVAL, but I'm OK either way.

Thanks,
Martin




[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