mm/vmscan.c: add checks for incorrect handling of current->reclaim_state
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 16 Jul 2019 23:26:15 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jul 2019 02:23:21 +0000 (19:23 -0700)
commit1732d2b0117c26a6bf6027c919e49603156ea93d
tree9a2f1cb59d5644dfc42b330af4bd0b98266e0e4f
parent0308f7cf19c9741837f5b4c8cde14342bba72604
mm/vmscan.c: add checks for incorrect handling of current->reclaim_state

Six sites are presently altering current->reclaim_state.  There is a
risk that one function stomps on a caller's value.  Use a helper
function to catch such errors.

Cc: Yafang Shao <laoar.shao@gmail.com>
Cc: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c