diff mbox series

[1/7] mm: kmem: remove duplicate definitions of __memcg_kmem_(un)charge()

Message ID 20200109172745.285585-2-guro@fb.com (mailing list archive)
State New, archived
Headers show
Series mm: memcg: kmem API cleanup | expand

Commit Message

Roman Gushchin Jan. 9, 2020, 5:27 p.m. UTC
For some reason these inline functions are defined twice. Remove
the second identical copy.

Signed-off-by: Roman Gushchin <guro@fb.com>
---
 include/linux/memcontrol.h | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Andrew Morton Jan. 9, 2020, 7:40 p.m. UTC | #1
On Thu, 9 Jan 2020 09:27:39 -0800 Roman Gushchin <guro@fb.com> wrote:

> For some reason these inline functions are defined twice. Remove
> the second identical copy.

Don't think so - that wouldn't have compiled.

> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -1438,15 +1438,6 @@ static inline void memcg_kmem_uncharge(struct page *page, int order)
>  {
>  }
>  
> -static inline int __memcg_kmem_charge(struct page *page, gfp_t gfp, int order)
> -{
> -	return 0;
> -}
> -
> -static inline void __memcg_kmem_uncharge(struct page *page, int order)
> -{
> -}
> -
>  #define for_each_memcg_cache_index(_idx)	\
>  	for (; NULL; )
>  

Maybe you confused these with memcg_kmem_charge() and
memcg_kmem_uncharge()?
Roman Gushchin Jan. 9, 2020, 7:56 p.m. UTC | #2
On Thu, Jan 09, 2020 at 11:40:55AM -0800, Andrew Morton wrote:
> On Thu, 9 Jan 2020 09:27:39 -0800 Roman Gushchin <guro@fb.com> wrote:
> 
> > For some reason these inline functions are defined twice. Remove
> > the second identical copy.
> 
> Don't think so - that wouldn't have compiled.
> 
> > --- a/include/linux/memcontrol.h
> > +++ b/include/linux/memcontrol.h
> > @@ -1438,15 +1438,6 @@ static inline void memcg_kmem_uncharge(struct page *page, int order)
> >  {
> >  }
> >  
> > -static inline int __memcg_kmem_charge(struct page *page, gfp_t gfp, int order)
> > -{
> > -	return 0;
> > -}
> > -
> > -static inline void __memcg_kmem_uncharge(struct page *page, int order)
> > -{
> > -}
> > -
> >  #define for_each_memcg_cache_index(_idx)	\
> >  	for (; NULL; )
> >  
> 
> Maybe you confused these with memcg_kmem_charge() and
> memcg_kmem_uncharge()?

You're right, I'm blind. Let me drop this patch and resend the series.

Thanks!
diff mbox series

Patch

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index a7a0a1a5c8d5..9745d172ba18 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1438,15 +1438,6 @@  static inline void memcg_kmem_uncharge(struct page *page, int order)
 {
 }
 
-static inline int __memcg_kmem_charge(struct page *page, gfp_t gfp, int order)
-{
-	return 0;
-}
-
-static inline void __memcg_kmem_uncharge(struct page *page, int order)
-{
-}
-
 #define for_each_memcg_cache_index(_idx)	\
 	for (; NULL; )