mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
xfs: make xfs_rtalloc_query_range input parameters const
In commit8ad560d256, we changed xfs_rtalloc_query_range to constrain the range of bits in the realtime bitmap file that would actually be searched. In commita3a374bf18, we changed the range again (incorrectly), leading to the fix in commitd88850bd55, which finally corrected the range check code. Unfortunately, the author never noticed that the function modifies its input parameters, which is a totaly no-no since none of the other range query functions change their input parameters. So, fix this function yet again to stash the upper end of the query range (i.e. the high key) in a local variable and hope this is the last time I have to fix my own function. While we're at it, mark the key inputs const so nobody makes this mistake again. :( Fixes:8ad560d256("xfs: strengthen rtalloc query range checks") Not-fixed-by:a3a374bf18("xfs: fix off-by-one error in xfs_rtalloc_query_range") Not-fixed-by:d88850bd55("xfs: fix high key handling in the rt allocator's query_range function") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
This commit is contained in:
parent
21b4ee7029
commit
c02f652986
2 changed files with 10 additions and 11 deletions
Loading…
Add table
Add a link
Reference in a new issue