2022-09-14 02:17:17

by Ke Sun

[permalink] [raw]
Subject: [PATCH] mm/filemap: Make folio_put_wait_locked static

It's only used in mm/filemap.c, since commit <ffa65753c431>
("mm/migrate.c: rework migration_entry_wait() to not take a pageref").

Make it static.

Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reported-by: k2ci <[email protected]>
Signed-off-by: Ke Sun <[email protected]>
---
include/linux/pagemap.h | 1 -
mm/filemap.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 0178b2040ea3..82880993dd1a 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1042,7 +1042,6 @@ static inline int wait_on_page_locked_killable(struct page *page)
return folio_wait_locked_killable(page_folio(page));
}

-int folio_put_wait_locked(struct folio *folio, int state);
void wait_on_page_writeback(struct page *page);
void folio_wait_writeback(struct folio *folio);
int folio_wait_writeback_killable(struct folio *folio);
diff --git a/mm/filemap.c b/mm/filemap.c
index 15800334147b..ade9b7bfe7fc 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1467,7 +1467,7 @@ EXPORT_SYMBOL(folio_wait_bit_killable);
*
* Return: 0 if the folio was unlocked or -EINTR if interrupted by a signal.
*/
-int folio_put_wait_locked(struct folio *folio, int state)
+static int folio_put_wait_locked(struct folio *folio, int state)
{
return folio_wait_bit_common(folio, PG_locked, state, DROP);
}
--
2.25.1


2022-09-15 00:52:05

by Ke Sun

[permalink] [raw]
Subject: Re: [PATCH] mm/filemap: Make folio_put_wait_locked static

Ping.

On 2022/9/14 09:58, Ke Sun wrote:
> It's only used in mm/filemap.c, since commit <ffa65753c431>
> ("mm/migrate.c: rework migration_entry_wait() to not take a pageref").
>
> Make it static.
>
> Cc: Andrew Morton <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Reported-by: k2ci <[email protected]>
> Signed-off-by: Ke Sun <[email protected]>
> ---
> include/linux/pagemap.h | 1 -
> mm/filemap.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 0178b2040ea3..82880993dd1a 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1042,7 +1042,6 @@ static inline int wait_on_page_locked_killable(struct page *page)
> return folio_wait_locked_killable(page_folio(page));
> }
>
> -int folio_put_wait_locked(struct folio *folio, int state);
> void wait_on_page_writeback(struct page *page);
> void folio_wait_writeback(struct folio *folio);
> int folio_wait_writeback_killable(struct folio *folio);
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 15800334147b..ade9b7bfe7fc 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1467,7 +1467,7 @@ EXPORT_SYMBOL(folio_wait_bit_killable);
> *
> * Return: 0 if the folio was unlocked or -EINTR if interrupted by a signal.
> */
> -int folio_put_wait_locked(struct folio *folio, int state)
> +static int folio_put_wait_locked(struct folio *folio, int state)
> {
> return folio_wait_bit_common(folio, PG_locked, state, DROP);
> }

2022-09-15 01:11:22

by Ke Sun

[permalink] [raw]
Subject: Re: [PATCH] mm/filemap: Make folio_put_wait_locked static

Ping.

On 2022/9/14 09:58, Ke Sun wrote:
> It's only used in mm/filemap.c, since commit <ffa65753c431>
> ("mm/migrate.c: rework migration_entry_wait() to not take a pageref").
>
> Make it static.
>
> Cc: Andrew Morton <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Reported-by: k2ci <[email protected]>
> Signed-off-by: Ke Sun <[email protected]>
> ---
> include/linux/pagemap.h | 1 -
> mm/filemap.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 0178b2040ea3..82880993dd1a 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1042,7 +1042,6 @@ static inline int
> wait_on_page_locked_killable(struct page *page)
> return folio_wait_locked_killable(page_folio(page));
> }
> -int folio_put_wait_locked(struct folio *folio, int state);
> void wait_on_page_writeback(struct page *page);
> void folio_wait_writeback(struct folio *folio);
> int folio_wait_writeback_killable(struct folio *folio);
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 15800334147b..ade9b7bfe7fc 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1467,7 +1467,7 @@ EXPORT_SYMBOL(folio_wait_bit_killable);
> *
> * Return: 0 if the folio was unlocked or -EINTR if interrupted by a
> signal.
> */
> -int folio_put_wait_locked(struct folio *folio, int state)
> +static int folio_put_wait_locked(struct folio *folio, int state)
> {
> return folio_wait_bit_common(folio, PG_locked, state, DROP);
> }

2022-09-15 01:18:35

by Ke Sun

[permalink] [raw]
Subject: Re: [PATCH] mm/filemap: Make folio_put_wait_locked static

Ping.

On 2022/9/14 09:58, Ke Sun wrote:
> It's only used in mm/filemap.c, since commit <ffa65753c431>
> ("mm/migrate.c: rework migration_entry_wait() to not take a pageref").
>
> Make it static.
>
> Cc: Andrew Morton <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Reported-by: k2ci <[email protected]>
> Signed-off-by: Ke Sun <[email protected]>
> ---
> include/linux/pagemap.h | 1 -
> mm/filemap.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 0178b2040ea3..82880993dd1a 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1042,7 +1042,6 @@ static inline int
> wait_on_page_locked_killable(struct page *page)
> return folio_wait_locked_killable(page_folio(page));
> }
> -int folio_put_wait_locked(struct folio *folio, int state);
> void wait_on_page_writeback(struct page *page);
> void folio_wait_writeback(struct folio *folio);
> int folio_wait_writeback_killable(struct folio *folio);
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 15800334147b..ade9b7bfe7fc 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1467,7 +1467,7 @@ EXPORT_SYMBOL(folio_wait_bit_killable);
> *
> * Return: 0 if the folio was unlocked or -EINTR if interrupted by a
> signal.
> */
> -int folio_put_wait_locked(struct folio *folio, int state)
> +static int folio_put_wait_locked(struct folio *folio, int state)
> {
> return folio_wait_bit_common(folio, PG_locked, state, DROP);
> }

2022-09-15 01:20:29

by Ke Sun

[permalink] [raw]
Subject: Re: [PATCH] mm/filemap: Make folio_put_wait_locked static

Ping.

On 2022/9/14 09:58, Ke Sun wrote:
> It's only used in mm/filemap.c, since commit <ffa65753c431>
> ("mm/migrate.c: rework migration_entry_wait() to not take a pageref").
>
> Make it static.
>
> Cc: Andrew Morton <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Reported-by: k2ci <[email protected]>
> Signed-off-by: Ke Sun <[email protected]>
> ---
> include/linux/pagemap.h | 1 -
> mm/filemap.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 0178b2040ea3..82880993dd1a 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1042,7 +1042,6 @@ static inline int
> wait_on_page_locked_killable(struct page *page)
> return folio_wait_locked_killable(page_folio(page));
> }
> -int folio_put_wait_locked(struct folio *folio, int state);
> void wait_on_page_writeback(struct page *page);
> void folio_wait_writeback(struct folio *folio);
> int folio_wait_writeback_killable(struct folio *folio);
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 15800334147b..ade9b7bfe7fc 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1467,7 +1467,7 @@ EXPORT_SYMBOL(folio_wait_bit_killable);
> *
> * Return: 0 if the folio was unlocked or -EINTR if interrupted by a
> signal.
> */
> -int folio_put_wait_locked(struct folio *folio, int state)
> +static int folio_put_wait_locked(struct folio *folio, int state)
> {
> return folio_wait_bit_common(folio, PG_locked, state, DROP);
> }

2022-09-15 07:44:06

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH] mm/filemap: Make folio_put_wait_locked static

On Thu, Sep 15, 2022 at 08:45:33AM +0800, Ke Sun wrote:
> Ping.

Don't be rude. I'm at a conference this week and on holiday next week.
This is hardly an urgent patch.

> On 2022/9/14 09:58, Ke Sun wrote:
> > It's only used in mm/filemap.c, since commit <ffa65753c431>
> > ("mm/migrate.c: rework migration_entry_wait() to not take a pageref").
> >
> > Make it static.
> >
> > Cc: Andrew Morton <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Reported-by: k2ci <[email protected]>
> > Signed-off-by: Ke Sun <[email protected]>
> > ---
> > include/linux/pagemap.h | 1 -
> > mm/filemap.c | 2 +-
> > 2 files changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> > index 0178b2040ea3..82880993dd1a 100644
> > --- a/include/linux/pagemap.h
> > +++ b/include/linux/pagemap.h
> > @@ -1042,7 +1042,6 @@ static inline int
> > wait_on_page_locked_killable(struct page *page)
> > return folio_wait_locked_killable(page_folio(page));
> > }
> > -int folio_put_wait_locked(struct folio *folio, int state);
> > void wait_on_page_writeback(struct page *page);
> > void folio_wait_writeback(struct folio *folio);
> > int folio_wait_writeback_killable(struct folio *folio);
> > diff --git a/mm/filemap.c b/mm/filemap.c
> > index 15800334147b..ade9b7bfe7fc 100644
> > --- a/mm/filemap.c
> > +++ b/mm/filemap.c
> > @@ -1467,7 +1467,7 @@ EXPORT_SYMBOL(folio_wait_bit_killable);
> > *
> > * Return: 0 if the folio was unlocked or -EINTR if interrupted by a
> > signal.
> > */
> > -int folio_put_wait_locked(struct folio *folio, int state)
> > +static int folio_put_wait_locked(struct folio *folio, int state)
> > {
> > return folio_wait_bit_common(folio, PG_locked, state, DROP);
> > }

2022-09-15 09:13:33

by Ke Sun

[permalink] [raw]
Subject: Re: [PATCH] mm/filemap: Make folio_put_wait_locked static


On 2022/9/15 15:30, Matthew Wilcox wrote:
> On Thu, Sep 15, 2022 at 08:45:33AM +0800, Ke Sun wrote:
>> Ping.
> Don't be rude. I'm at a conference this week and on holiday next week.
> This is hardly an urgent patch.
So sorry to bother you. Some duplicate emails were sent due to issues
with mailbox app settings.
>> On 2022/9/14 09:58, Ke Sun wrote:
>>> It's only used in mm/filemap.c, since commit <ffa65753c431>
>>> ("mm/migrate.c: rework migration_entry_wait() to not take a pageref").
>>>
>>> Make it static.
>>>
>>> Cc: Andrew Morton <[email protected]>
>>> Cc: [email protected]
>>> Cc: [email protected]
>>> Reported-by: k2ci <[email protected]>
>>> Signed-off-by: Ke Sun <[email protected]>
>>> ---
>>> include/linux/pagemap.h | 1 -
>>> mm/filemap.c | 2 +-
>>> 2 files changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
>>> index 0178b2040ea3..82880993dd1a 100644
>>> --- a/include/linux/pagemap.h
>>> +++ b/include/linux/pagemap.h
>>> @@ -1042,7 +1042,6 @@ static inline int
>>> wait_on_page_locked_killable(struct page *page)
>>> return folio_wait_locked_killable(page_folio(page));
>>> }
>>> -int folio_put_wait_locked(struct folio *folio, int state);
>>> void wait_on_page_writeback(struct page *page);
>>> void folio_wait_writeback(struct folio *folio);
>>> int folio_wait_writeback_killable(struct folio *folio);
>>> diff --git a/mm/filemap.c b/mm/filemap.c
>>> index 15800334147b..ade9b7bfe7fc 100644
>>> --- a/mm/filemap.c
>>> +++ b/mm/filemap.c
>>> @@ -1467,7 +1467,7 @@ EXPORT_SYMBOL(folio_wait_bit_killable);
>>> *
>>> * Return: 0 if the folio was unlocked or -EINTR if interrupted by a
>>> signal.
>>> */
>>> -int folio_put_wait_locked(struct folio *folio, int state)
>>> +static int folio_put_wait_locked(struct folio *folio, int state)
>>> {
>>> return folio_wait_bit_common(folio, PG_locked, state, DROP);
>>> }