Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit acd1ac3a authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

xfs: limit entries returned when counting fsmap records

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: e89c0413

 ("xfs: implement the GETFSMAP ioctl")
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChandan Babu R <chandanrlinux@gmail.com>
parent 74f4d6a1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment