[Cluster-devel] [PATCH v2 1/2] iomap: Add a page_prepare callback

Matthew Wilcox willy at infradead.org
Thu Apr 25 15:29:40 UTC 2019


On Thu, Apr 25, 2019 at 05:26:30PM +0200, Andreas Gruenbacher wrote:

This seems to be corrupted; there's no declaration of a page_ops in
iomap_write_begin ... unless you're basing on a patch I don't have?

> diff --git a/fs/iomap.c b/fs/iomap.c
> index 97cb9d486a7d..967c985c5310 100644
> --- a/fs/iomap.c
> +++ b/fs/iomap.c
> @@ -674,9 +674,17 @@ iomap_write_begin(struct inode *inode, loff_t pos, unsigned len, unsigned flags,
>  	if (fatal_signal_pending(current))
>  		return -EINTR;
>  
> +	if (page_ops) {
> +		status = page_ops->page_prepare(inode, pos, len, iomap);
> +		if (status)
> +			return status;
> +	}
> +
>  	page = grab_cache_page_write_begin(inode->i_mapping, index, flags);
> -	if (!page)
> -		return -ENOMEM;
> +	if (!page) {
> +		status = -ENOMEM;
> +		goto no_page;
> +	}
>  
>  	if (iomap->type == IOMAP_INLINE)
>  		iomap_read_inline_data(inode, page, iomap);




More information about the Cluster-devel mailing list