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

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

 



On Mon, Jul 08, 2024 at 10:57:12AM -0600, Martin Oliveira wrote:
> -	/*
> -	 * It is not possible to successfully wrap close.
> -	 * So error if someone is trying to use close.
> -	 */
> -	if (vma->vm_ops && vma->vm_ops->close)
> -		goto out_put;
> +	if (vma->vm_ops) {
> +		/*
> +		 * It is not possible to successfully wrap close.
> +		 * So error if someone is trying to use close.
> +		 */
> +		if (vma->vm_ops->close)
> +			goto out_put;
> +
> +		if (WARN_ON_ONCE(vma->vm_ops->page_mkwrite))
> +			goto out_put;
> +	}

This is stupid.  Warn for both or neither.




[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