diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e3d56927a724..c1e64d60ed02 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6280,11 +6280,7 @@ static ssize_t swap_max_write(struct kernfs_open_file *of, if (err) return err; - mutex_lock(&memcg_max_mutex); - err = page_counter_set_max(&memcg->swap, max); - mutex_unlock(&memcg_max_mutex); - if (err) - return err; + xchg(&memcg->swap.max, max); return nbytes; } |