On Fri, Apr 24, 2020 at 12:52:17PM +0530, Ritesh Harjani wrote: > We better warn the fibmap user and not return a truncated and therefore > an incorrect block map address if the bmap() returned block address > is greater than INT_MAX (since user supplied integer pointer). > > It's better to WARN all user of ioctl_fibmap() and return a proper error > code rather than silently letting a FS corruption happen if the user tries > to fiddle around with the returned block map address. > > We fix this by returning an error code of -ERANGE and returning 0 as the > block mapping address in case if it is > INT_MAX. > > Signed-off-by: Ritesh Harjani <riteshh@xxxxxxxxxxxxx> Looks good, Reviewed-by: Christoph Hellwig <hch@xxxxxx>