Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libswap: fix tst_max_swapfiles() for SWP_SWAPIN_ERROR_NUM
swapon03 fails because it doesn't includes SWP_SWAPIN_ERROR_NUM to calculate MAX_SWAPFILES. However linux v5.19-v6.1.y includes, as: #define MAX_SWAPFILES \ ((1 << MAX_SWAPFILES_SHIFT) - SWP_DEVICE_NUM - \ SWP_MIGRATION_NUM - SWP_HWPOISON_NUM - \ SWP_PTE_MARKER_NUM - SWP_SWAPIN_ERROR_NUM) Including SWP_SWAPIN_ERROR_NUM to calculate MAX_SWAPFILES, if Linux version is >= v5.19 and < v6.2. Signed-off-by: Ajay Kaher <[email protected]> Reviewed-by: Cyril Hrubis <[email protected]>
- Loading branch information