generic: test small swapfile without page-aligned contiguous blocks
authorZorro Lang <zlang@redhat.com>
Mon, 26 Jul 2021 09:46:05 +0000 (17:46 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 1 Aug 2021 10:15:48 +0000 (18:15 +0800)
commitb030dd07324fbfa417855fbd03e17a063db6de17
tree980db2a599e40c0d6a4333b9b65e565c7f8b2d7a
parente52ceab66d76496a377372e58595a474187bc2bc
generic: test small swapfile without page-aligned contiguous blocks

If a swapfile doesn't contain even a single page-aligned contiguous
range of blocks, it's an invalid swapfile, and might cause kernel
issue. This case covered commit 5808fecc5723 ("iomap: Fix negative
assignment to unsigned sis->pages in iomap_swapfile_activate").

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/641 [new file with mode: 0755]
tests/generic/641.out [new file with mode: 0644]