diff options
| author | Javier Tia <javier@peridio.com> | 2026-08-10 17:06:18 -0600 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-09-07 07:50:34 +0200 |
| commit | 0fe77e57588b989450d668f7c978bb0264c5c340 (patch) | |
| tree | a5f0d7107a1793a4a3256d37f5eb39c533d8c79c /scripts/patch-kernel | |
| parent | 8e4ebb6afaa34bd2e8ce52da231003d24111c2d6 (diff) | |
xfs: assert the reservation covers each da fork growth
xfs_da_grow_inode_int() subtracts the blocks it just allocated from
args->total, the caller's remaining block reservation. The subtraction
is unsigned, so a caller that reaches it with too small a total wraps
the field instead of failing, and every allocation afterwards runs with
a bogus reservation. Assert the remaining reservation still covers the
step, so an under-reserved or uninitialised total trips in debug builds
instead of silently wrapping.
Suggested-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Javier Tia <floss@jetm.me>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
