Skip to content

Commit

Permalink
mm/memcontrol.c: remove the unused arg in __memcg_kmem_get_cache()
Browse files Browse the repository at this point in the history
The gfp was passed in but never used in this function.

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Zhang Zhen authored and Linus Torvalds committed Dec 13, 2014
1 parent bd6dace commit 056b7cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/linux/memcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ int memcg_cache_id(struct mem_cgroup *memcg);
void memcg_update_array_size(int num_groups);

struct kmem_cache *
__memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp);
__memcg_kmem_get_cache(struct kmem_cache *cachep);

int __memcg_charge_slab(struct kmem_cache *cachep, gfp_t gfp, int order);
void __memcg_uncharge_slab(struct kmem_cache *cachep, int order);
Expand Down Expand Up @@ -492,7 +492,7 @@ memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp)
if (unlikely(fatal_signal_pending(current)))
return cachep;

return __memcg_kmem_get_cache(cachep, gfp);
return __memcg_kmem_get_cache(cachep);
}
#else
#define for_each_memcg_cache_index(_idx) \
Expand Down
3 changes: 1 addition & 2 deletions mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2804,8 +2804,7 @@ void __memcg_uncharge_slab(struct kmem_cache *cachep, int order)
* Can't be called in interrupt context or from kernel threads.
* This function needs to be called with rcu_read_lock() held.
*/
struct kmem_cache *__memcg_kmem_get_cache(struct kmem_cache *cachep,
gfp_t gfp)
struct kmem_cache *__memcg_kmem_get_cache(struct kmem_cache *cachep)
{
struct mem_cgroup *memcg;
struct kmem_cache *memcg_cachep;
Expand Down

0 comments on commit 056b7cc

Please sign in to comment.