mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
f2fs: return EINVAL for hole cases in swap file
This tries to fix xfstests/generic/495. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
2f998899f3
commit
030ee5e654
|
|
@ -3907,7 +3907,7 @@ static int check_swap_activate_fast(struct swap_info_struct *sis,
|
||||||
/* hole */
|
/* hole */
|
||||||
if (!(map.m_flags & F2FS_MAP_FLAGS)) {
|
if (!(map.m_flags & F2FS_MAP_FLAGS)) {
|
||||||
f2fs_err(sbi, "Swapfile has holes\n");
|
f2fs_err(sbi, "Swapfile has holes\n");
|
||||||
ret = -ENOENT;
|
ret = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4063,7 +4063,7 @@ static int check_swap_activate(struct swap_info_struct *sis,
|
||||||
return ret;
|
return ret;
|
||||||
bad_bmap:
|
bad_bmap:
|
||||||
f2fs_err(sbi, "Swapfile has holes\n");
|
f2fs_err(sbi, "Swapfile has holes\n");
|
||||||
return -ENOENT;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int f2fs_swap_activate(struct swap_info_struct *sis, struct file *file,
|
static int f2fs_swap_activate(struct swap_info_struct *sis, struct file *file,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user