Re: [PATCH v2 2/2] fs: kill add_to_page_cache_locked()

From: Matthew Wilcox
Date: Wed Oct 21 2020 - 16:51:39 EST


On Wed, Oct 21, 2020 at 03:57:45PM -0400, Kent Overstreet wrote:
> }
> -ALLOW_ERROR_INJECTION(__add_to_page_cache_locked, ERRNO);
> +ALLOW_ERROR_INJECTION(__add_to_page_cache, ERRNO);
[..]
> +int add_to_page_cache(struct page *page, struct address_space *mapping,
> + pgoff_t offset, gfp_t gfp_mask)
> {
> - return __add_to_page_cache_locked(page, mapping, offset,
> - gfp_mask, NULL);
> + return __add_to_page_cache(page, mapping, offset, gfp_mask, NULL);
> }
> -EXPORT_SYMBOL(add_to_page_cache_locked);
> +EXPORT_SYMBOL(add_to_page_cache);
> +ALLOW_ERROR_INJECTION(add_to_page_cache, ERRNO);

I don't think you need this second one since __add_to_page_cache can be
used for the same purpose.