swap: fix case where we ended up self swapping when it's forbidden
authorAlan Cox <alan@linux.intel.com>
Sun, 25 Nov 2018 01:41:20 +0000 (01:41 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 25 Nov 2018 01:41:20 +0000 (01:41 +0000)
commitca2aedb2742acfe0e09c27eb608ccb5553dec03d
tree1fe4c3cf5f04e9708e60ee67e89cf2a499396c8f
parentfe7d5a63dadcbd97a123098008adb3b88925fbed
swap: fix case where we ended up self swapping when it's forbidden

If the only other processes you have in memory are running, and you have
gone to sleep thus triggering your swapout then we would try and swap out the
running process, which isn't supported (because we avoid the cost of a swapper
process we pay that small cost here).
Kernel/swap.c