]> git.baikalelectronics.ru Git - kernel.git/commit
huge tmpfs: fix Committed_AS leak
authorHugh Dickins <hughd@google.com>
Sat, 24 Sep 2016 03:24:23 +0000 (20:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Sep 2016 18:20:01 +0000 (11:20 -0700)
commit3130e71fa42ede9418a9a9a4509c943c9d5ccba1
tree96572603989e027b559a3e117a773bb62ec434e3
parent268f055765bc66010854ec5d852b86f886af0eaf
huge tmpfs: fix Committed_AS leak

Under swapping load on huge tmpfs, /proc/meminfo's Committed_AS grows
bigger and bigger: just a cosmetic issue for most users, but disabling
for those who run without overcommit (/proc/sys/vm/overcommit_memory 2).

shmem_uncharge() was forgetting to unaccount __vm_enough_memory's
charge, and shmem_charge() was forgetting it on the filesystem-full
error path.

Fixes: 62fcdc637a11 ("shmem: add huge pages support")
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/shmem.c