Darrick J. Wong 1577152a3a xfs: limit entries returned when counting fsmap records
[ Upstream commit acd1ac3aa22fd58803a12d26b1ab7f70232f8d8d ]

If userspace asked fsmap 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: e89c041338ed ("xfs: implement the GETFSMAP ioctl")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:07:09 +01:00
..
2018-02-03 17:39:14 +01:00
2017-09-02 08:22:19 -07:00
2017-04-03 15:18:17 -07:00
2017-08-04 13:43:36 -07:00
2017-04-03 15:18:17 -07:00
2017-09-01 10:55:30 -07:00
2017-09-01 10:55:30 -07:00