Darrick J. Wong f2f616f3e3 ext4: limit entries returned when counting fsmap records
[ Upstream commit af8c53c8bc087459b1aadd4c94805d8272358d79 ]

If userspace asked fsmap to try to count the number of entries, we cannot
return more than UINT_MAX entries because fmh_entries is u32.
Therefore, stop counting if we hit this limit or else we will waste time
to return truncated results.

Fixes: 0c9ec4beecac ("ext4: support GETFSMAP ioctls")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Link: https://lore.kernel.org/r/20201001222148.GA49520@magnolia
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:57:55 +01:00
..
2019-08-12 19:33:50 -07:00
2020-09-03 11:26:57 +02:00
2019-08-12 19:33:50 -07:00
2019-08-12 19:33:50 -07:00
2020-06-22 09:31:15 +02:00