[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFqt6zY5bh3TzA3giymxN2=37CmCTV-dL6mjKR4nkH6m8r-AOA@mail.gmail.com>
Date: Wed, 23 Dec 2020 08:48:23 +0530
From: Souptick Joarder <jrdr.linux@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linux-MM <linux-mm@...ck.org>, linux-kernel@...r.kernel.org,
Alex Shi <alex.shi@...ux.alibaba.com>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH] mm: add prototype for __add_to_page_cache_locked()
On Wed, Dec 23, 2020 at 8:46 AM Souptick Joarder <jrdr.linux@...il.com> wrote:
>
> Otherwise it causes a gcc warning:
>
> ../mm/filemap.c:830:14: warning: no previous prototype for
> `__add_to_page_cache_locked' [-Wmissing-prototypes]
>
> A previous attempt to make this function static led to compilation
> errors when CONFIG_DEBUG_INFO_BTF is enabled because
> __add_to_page_cache_locked() is referred to by BPF code.
>
> Adding a prototype will silence the warning.
>
Please ignore this patch. I forget to update version.
> Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
> Cc: Alex Shi <alex.shi@...ux.alibaba.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Matthew Wilcox <willy@...radead.org>
> ---
> include/linux/mm.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 5299b90a..c1e9081 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -216,6 +216,13 @@ int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *,
> loff_t *);
> int overcommit_policy_handler(struct ctl_table *, int, void *, size_t *,
> loff_t *);
> +/*
> + * Any attempt to mark this function as static leads to build failure
> + * when CONFIG_DEBUG_INFO_BTF is enabled because __add_to_page_cache_locked()
> + * is referred to by BPF code. This must be visible for error injection.
> + */
> +int __add_to_page_cache_locked(struct page *page, struct address_space *mapping,
> + pgoff_t index, gfp_t gfp, void **shadowp);
>
> #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
>
> --
> 1.9.1
>
Powered by blists - more mailing lists