]> git.baikalelectronics.ru Git - kernel.git/commit
mm/swapfile.c: found_free could be represented by (tmp < max)
authorWei Yang <richard.weiyang@gmail.com>
Tue, 2 Jun 2020 04:49:01 +0000 (21:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Jun 2020 17:59:09 +0000 (10:59 -0700)
commit491e89be48c79e652ba502bb416a27bf6310c020
tree3973516dc52c52970a1747598d0c504ca7a8c946
parent6d50293b75d57c1d640a6890ecd42faad492c316
mm/swapfile.c: found_free could be represented by (tmp < max)

This is not necessary to use the variable found_free to record the status.
Just check tmp and max is enough.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Link: http://lkml.kernel.org/r/20200421213824.8099-1-richard.weiyang@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swapfile.c