]> git.baikalelectronics.ru Git - kernel.git/commit
mm/shmem: shmem_replace_page() remember NR_SHMEM
authorHugh Dickins <hughd@google.com>
Thu, 11 Aug 2022 05:06:33 +0000 (22:06 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 20 Aug 2022 22:17:45 +0000 (15:17 -0700)
commit6133e58042cdecc51d908edf975a38be353ab17e
treedec5291667487401c33c1042c58eae90055c8feb
parent83a081df773e20aa3bea4547909421c4cb062a42
mm/shmem: shmem_replace_page() remember NR_SHMEM

Elsewhere, NR_SHMEM is updated at the same time as shmem NR_FILE_PAGES;
but shmem_replace_page() was forgetting to do that - so NR_SHMEM stats
could grow too big or too small, in those unusual cases when it's used.

Link: https://lkml.kernel.org/r/cec7c09d-5874-e160-ada6-6e10ee48784@google.com
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: Radoslaw Burny <rburny@google.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c