linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: make __invalidate_mapping_pages() static
@ 2020-10-15  5:48 Jason Yan
  2020-10-15  6:09 ` Yafang Shao
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-10-15  5:48 UTC (permalink / raw)
  To: akpm, laoar.shao, linux-mm; +Cc: Jason Yan

Fix the following sparse warning:

mm/truncate.c:531:15: warning: symbol '__invalidate_mapping_pages' was
not declared. Should it be static?

Fixes: eb1d7a65f08a ("mm, fadvise: improve the expensive remote LRU cache draining after FADV_DONTNEED")
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 mm/truncate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/truncate.c b/mm/truncate.c
index 18cec39a9f53..960edf5803ca 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -528,7 +528,7 @@ void truncate_inode_pages_final(struct address_space *mapping)
 }
 EXPORT_SYMBOL(truncate_inode_pages_final);
 
-unsigned long __invalidate_mapping_pages(struct address_space *mapping,
+static unsigned long __invalidate_mapping_pages(struct address_space *mapping,
 		pgoff_t start, pgoff_t end, unsigned long *nr_pagevec)
 {
 	pgoff_t indices[PAGEVEC_SIZE];
-- 
2.25.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: make __invalidate_mapping_pages() static
  2020-10-15  5:48 [PATCH] mm: make __invalidate_mapping_pages() static Jason Yan
@ 2020-10-15  6:09 ` Yafang Shao
  0 siblings, 0 replies; 2+ messages in thread
From: Yafang Shao @ 2020-10-15  6:09 UTC (permalink / raw)
  To: Jason Yan; +Cc: Andrew Morton, Linux MM

On Thu, Oct 15, 2020 at 1:44 PM Jason Yan <yanaijie@huawei.com> wrote:
>
> Fix the following sparse warning:
>
> mm/truncate.c:531:15: warning: symbol '__invalidate_mapping_pages' was
> not declared. Should it be static?
>
> Fixes: eb1d7a65f08a ("mm, fadvise: improve the expensive remote LRU cache draining after FADV_DONTNEED")
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  mm/truncate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/truncate.c b/mm/truncate.c
> index 18cec39a9f53..960edf5803ca 100644
> --- a/mm/truncate.c
> +++ b/mm/truncate.c
> @@ -528,7 +528,7 @@ void truncate_inode_pages_final(struct address_space *mapping)
>  }
>  EXPORT_SYMBOL(truncate_inode_pages_final);
>
> -unsigned long __invalidate_mapping_pages(struct address_space *mapping,
> +static unsigned long __invalidate_mapping_pages(struct address_space *mapping,
>                 pgoff_t start, pgoff_t end, unsigned long *nr_pagevec)
>  {
>         pgoff_t indices[PAGEVEC_SIZE];
> --
> 2.25.4
>

Ah, this new helper is only used in truncate.c, so it should be static.
Thanks for catching it.

Reviewed-by: Yafang Shao <laoar.shao@gmail.com>

-- 
Thanks
Yafang


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-15  6:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15  5:48 [PATCH] mm: make __invalidate_mapping_pages() static Jason Yan
2020-10-15  6:09 ` Yafang Shao

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).