BACKPORT: mm: do_wp_page() simplification
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Aug 2020 23:49:55 +0000 (19:49 -0400)
committerTodd Kjos <tkjos@google.com>
Thu, 7 Jul 2022 02:21:26 +0000 (19:21 -0700)
commit32c2bf987549e56f11784b194a33b091fa3bc482
tree1bd6064ee4557167d925ee7fb3ae348e6aba0427
parente374fe2602945f563e12ba9e3276f196523a4802
BACKPORT: mm: do_wp_page() simplification

How about we just make sure we're the only possible valid user fo the
page before we bother to reuse it?

Simplify, simplify, simplify.

And get rid of the nasty serialization on the page lock at the same time.

[peterx: add subject prefix]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 09854ba94c6aad7886996bfbee2530b3d8a7f4f4)

[Kalesh Singh: Resolve conflict in mm/memory.c]
Bug: 176847924
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: I0b855b305332564670b8cbea9660405fed89a044
mm/memory.c