mm: fix clear_refs_write locking
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jan 2021 21:13:41 +0000 (13:13 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 16 Jan 2021 18:46:39 +0000 (10:46 -0800)
commit29a951dfb3c3263c3a0f3bd9f7f2c2cfde4baedb
tree04043448c9ada73ea98a6b573520e4b0c9ef8e14
parent1d94330a437a573cfdf848f6743b1ed169242c8a
mm: fix clear_refs_write locking

Turning page table entries read-only requires the mmap_sem held for
writing.

So stop doing the odd games with turning things from read locks to write
locks and back.  Just get the write lock.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/task_mmu.c