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)
commit0fd0e19e4d0e9c84117584783535a57ec3ae98c6
tree3973516dc52c52970a1747598d0c504ca7a8c946
parentabca1c84b7575b470789c8686688b11ba3bf138d
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