diff --git a/mm/memcontrol.c b/mm/memcontrol.c index a3e96336676943d30833c9e84ecdc0677126e738..bb0d3ac80ade83c001cf966008be36aa2ed48819 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6213,8 +6213,6 @@ static ssize_t memory_high_write(struct kernfs_open_file *of, if (err) return err; - page_counter_set_high(&memcg->memory, high); - for (;;) { unsigned long nr_pages = page_counter_read(&memcg->memory); unsigned long reclaimed; @@ -6238,6 +6236,8 @@ static ssize_t memory_high_write(struct kernfs_open_file *of, break; } + page_counter_set_high(&memcg->memory, high); + return nbytes; }