Skip to content

Commit

Permalink
mm/page_counter: remove an incorrect call to propagate_protected_usage()
Browse files Browse the repository at this point in the history
propagate_protected_usage() is called to propagate the usage change in
the page_counter structure.  But there is a call to this function from
page_counter_try_charge() when there is actually no usage change.  Hence
this call should be removed.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Donghai Qiao <[email protected]>
Reviewed-by: Roman Gushchin <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
donghaiqiao authored and torvalds committed Jan 15, 2022
1 parent 17c1736 commit 46a5337
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/page_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ bool page_counter_try_charge(struct page_counter *counter,
new = atomic_long_add_return(nr_pages, &c->usage);
if (new > c->max) {
atomic_long_sub(nr_pages, &c->usage);
propagate_protected_usage(c, new);
/*
* This is racy, but we can live with some
* inaccuracy in the failcnt which is only used
Expand Down

0 comments on commit 46a5337

Please sign in to comment.