diff options
| author | Christoph Hellwig <[email protected]> | 2024-08-30 22:36:54 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2024-09-01 15:58:19 +0000 |
| commit | 6d2db12d56a389b3e8efa236976f8dc3a8ae00f0 (patch) | |
| tree | db5628131d90072aedaa5f4c8a11615e8a0c63f6 /fs/xfs/libxfs/xfs_rtbitmap.c | |
| parent | xfs: remove the limit argument to xfs_rtfind_back (diff) | |
| download | kernel-6d2db12d56a389b3e8efa236976f8dc3a8ae00f0.tar.gz kernel-6d2db12d56a389b3e8efa236976f8dc3a8ae00f0.zip | |
xfs: assert a valid limit in xfs_rtfind_forw
Protect against developers passing stupid limits when refactoring the
RT code once again.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rtbitmap.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c index 9feeefe53948..4de97c4e8ebd 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.c +++ b/fs/xfs/libxfs/xfs_rtbitmap.c @@ -315,6 +315,8 @@ xfs_rtfind_forw( xfs_rtword_t incore; unsigned int word; /* word number in the buffer */ + ASSERT(start <= limit); + /* * Compute and read in starting bitmap block for starting block. */ |
