summaryrefslogtreecommitdiff
path: root/lib/Kconfig.kgdb
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2022-11-30 08:41:01 -0800
committerDarrick J. Wong <djwong@kernel.org>2022-11-30 08:41:01 -0800
commita79168a0c00d710420c1758f6c38df89e12f0763 (patch)
treef9a7d9faade51d699ff87f3aed8bf281ab19785b /lib/Kconfig.kgdb
parentf0c4d9fc9cc9462659728d168387191387e903cc (diff)
fs/remap_range: avoid spurious writeback on zero length requestvfs-6.2-merge-1
generic_remap_checks() can reduce the effective request length (i.e., after the reflink extend to EOF case is handled) down to zero. If this occurs, __generic_remap_file_range_prep() proceeds through dio serialization, file mapping flush calls, and may invoke file_modified() before returning back to the filesystem caller, all of which immediately check for len == 0 and return. While this is mostly harmless, it is spurious and not completely without side effect. A filemap write call can submit I/O (but not wait on it) when the specified end byte precedes the start but happens to land on the same aligned page boundary, which can occur from __generic_remap_file_range_prep() when len is 0. The dedupe path already has a len == 0 check to break out before doing range comparisons. Lift this check a bit earlier in the function to cover the general case of len == 0 and avoid the unnecessary work. While here, account for the case where generic_remap_check_len() may also reduce length to zero. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'lib/Kconfig.kgdb')
0 files changed, 0 insertions, 0 deletions