mm/page_counter: remove an incorrect call to propagate_protected_usage()
Subsystems (2)
PATCH 1/1 mm/page_counter: remove an incorrect call to propagate_protected_usage()
The function propagate_protected_usage() is called to propagate the usage change in the page_counter structure. But there is call to this function from page_counter_try_charge() when there is actually no usage change. Hence this call should be removed.
Signed-off-by Donghai Qiao <[email protected]>
--- mm/page_counter.c | 1 - 1 file changed, 1 deletion(-)
mm/page_counter.c +0 -1
@@ -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
Signature · 1 line
2.27.0
Quoted 6 lines · Donghai Qiao
The function
propagate_protected_usage()is called to propagate the usage change in thepage_counterstructure. But there is call to this function frompage_counter_try_charge()when there is actually no usage change. Hence this call should be removed.Signed-off-by Donghai Qiao <[email protected]>
Reviewed-by Roman Gushchin <[email protected]>
Thanks, Donghai!