LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH TRIVIAL] swap: remove unused mem_cgroup_uncharge_swapcache declaration
@ 2014-12-29 11:58 Vladimir Davydov
  2014-12-29 12:10 ` Michal Hocko
  2014-12-29 17:03 ` Johannes Weiner
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Davydov @ 2014-12-29 11:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Johannes Weiner, Michal Hocko, linux-mm, linux-kernel

The body of this function was removed by commit 0a31bc97c80c ("mm:
memcontrol: rewrite uncharge API").

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
 include/linux/swap.h |   15 ---------------
 mm/shmem.c           |    2 +-
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 34e8b60ab973..7067eca501e2 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -437,16 +437,6 @@ extern int reuse_swap_page(struct page *);
 extern int try_to_free_swap(struct page *);
 struct backing_dev_info;
 
-#ifdef CONFIG_MEMCG
-extern void
-mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout);
-#else
-static inline void
-mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout)
-{
-}
-#endif
-
 #else /* CONFIG_SWAP */
 
 #define swap_address_space(entry)		(NULL)
@@ -547,11 +537,6 @@ static inline swp_entry_t get_swap_page(void)
 	return entry;
 }
 
-static inline void
-mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)
-{
-}
-
 #endif /* CONFIG_SWAP */
 #endif /* __KERNEL__*/
 #endif /* _LINUX_SWAP_H */
diff --git a/mm/shmem.c b/mm/shmem.c
index 185836ba53ef..0c92e925c4bf 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1131,7 +1131,7 @@ repeat:
 			 * truncated or holepunched since swap was confirmed.
 			 * shmem_undo_range() will have done some of the
 			 * unaccounting, now delete_from_swap_cache() will do
-			 * the rest (including mem_cgroup_uncharge_swapcache).
+			 * the rest.
 			 * Reset swap.val? No, leave it so "failed" goes back to
 			 * "repeat": reading a hole and writing should succeed.
 			 */
-- 
1.7.10.4


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

* Re: [PATCH TRIVIAL] swap: remove unused mem_cgroup_uncharge_swapcache declaration
  2014-12-29 11:58 [PATCH TRIVIAL] swap: remove unused mem_cgroup_uncharge_swapcache declaration Vladimir Davydov
@ 2014-12-29 12:10 ` Michal Hocko
  2014-12-29 17:03 ` Johannes Weiner
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2014-12-29 12:10 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Andrew Morton, Johannes Weiner, linux-mm, linux-kernel

On Mon 29-12-14 14:58:57, Vladimir Davydov wrote:
> The body of this function was removed by commit 0a31bc97c80c ("mm:
> memcontrol: rewrite uncharge API").
> 
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>

Acked-by: Michal Hocko <mhocko@suse.cz>

> ---
>  include/linux/swap.h |   15 ---------------
>  mm/shmem.c           |    2 +-
>  2 files changed, 1 insertion(+), 16 deletions(-)
> 
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 34e8b60ab973..7067eca501e2 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -437,16 +437,6 @@ extern int reuse_swap_page(struct page *);
>  extern int try_to_free_swap(struct page *);
>  struct backing_dev_info;
>  
> -#ifdef CONFIG_MEMCG
> -extern void
> -mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout);
> -#else
> -static inline void
> -mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout)
> -{
> -}
> -#endif
> -
>  #else /* CONFIG_SWAP */
>  
>  #define swap_address_space(entry)		(NULL)
> @@ -547,11 +537,6 @@ static inline swp_entry_t get_swap_page(void)
>  	return entry;
>  }
>  
> -static inline void
> -mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)
> -{
> -}
> -
>  #endif /* CONFIG_SWAP */
>  #endif /* __KERNEL__*/
>  #endif /* _LINUX_SWAP_H */
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 185836ba53ef..0c92e925c4bf 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -1131,7 +1131,7 @@ repeat:
>  			 * truncated or holepunched since swap was confirmed.
>  			 * shmem_undo_range() will have done some of the
>  			 * unaccounting, now delete_from_swap_cache() will do
> -			 * the rest (including mem_cgroup_uncharge_swapcache).
> +			 * the rest.
>  			 * Reset swap.val? No, leave it so "failed" goes back to
>  			 * "repeat": reading a hole and writing should succeed.
>  			 */
> -- 
> 1.7.10.4
> 

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH TRIVIAL] swap: remove unused mem_cgroup_uncharge_swapcache declaration
  2014-12-29 11:58 [PATCH TRIVIAL] swap: remove unused mem_cgroup_uncharge_swapcache declaration Vladimir Davydov
  2014-12-29 12:10 ` Michal Hocko
@ 2014-12-29 17:03 ` Johannes Weiner
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Weiner @ 2014-12-29 17:03 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Andrew Morton, Michal Hocko, linux-mm, linux-kernel

On Mon, Dec 29, 2014 at 02:58:57PM +0300, Vladimir Davydov wrote:
> The body of this function was removed by commit 0a31bc97c80c ("mm:
> memcontrol: rewrite uncharge API").
> 
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

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

end of thread, other threads:[~2014-12-29 17:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-29 11:58 [PATCH TRIVIAL] swap: remove unused mem_cgroup_uncharge_swapcache declaration Vladimir Davydov
2014-12-29 12:10 ` Michal Hocko
2014-12-29 17:03 ` Johannes Weiner

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