]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
mm/swapfile.c: use memset to fill the swap_map with SWAP_HAS_CACHE
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 15 Dec 2020 03:06:07 +0000 (19:06 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:39 +0000 (12:13 -0800)
commit661c7566438119cbf490b0b359ee69a0f9dbaf9a
tree9940b14d353b301aeed64667987a63ce37c476e2
parent9d9a03340309cb8065503cfa3c5c5fc8b7670230
mm/swapfile.c: use memset to fill the swap_map with SWAP_HAS_CACHE

We could use helper memset to fill the swap_map with SWAP_HAS_CACHE instead
of a direct loop here to simplify the code. Also we can remove the local
variable i and map this way.

Link: https://lkml.kernel.org/r/20200921122224.7139-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swapfile.c