From: Souptick Joarder <jrdr.linux@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Souptick Joarder <jrdr.linux@gmail.com>,
Alex Shi <alex.shi@linux.alibaba.com>,
Matthew Wilcox <willy@infradead.org>
Subject: [PATCH] mm: add prototype for __add_to_page_cache_locked()
Date: Wed, 23 Dec 2020 08:46:18 +0530 [thread overview]
Message-ID: <1608693378-4392-1-git-send-email-jrdr.linux@gmail.com> (raw)
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.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.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
next reply other threads:[~2020-12-23 3:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 3:16 Souptick Joarder [this message]
2020-12-23 3:18 ` [PATCH] mm: add prototype for __add_to_page_cache_locked() Souptick Joarder
-- strict thread matches above, loose matches on Subject: below --
2020-12-22 14:19 Souptick Joarder
2020-12-22 20:40 ` Matthew Wilcox
2020-12-22 23:53 ` Andrew Morton
2020-12-23 1:19 ` Matthew Wilcox
2020-12-23 8:31 ` Christoph Hellwig
2020-12-23 12:11 ` Matthew Wilcox
2020-12-23 15:52 ` Christoph Hellwig
2020-12-28 0:59 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1608693378-4392-1-git-send-email-jrdr.linux@gmail.com \
--to=jrdr.linux@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).