diff options
author | John Garry <[email protected]> | 2024-11-11 11:21:45 +0000 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2024-11-11 08:35:46 -0700 |
commit | e546fe1da9bd47a6fddce6b37c17b1aa1811f7d3 (patch) | |
tree | 6f9f63b0c46fe67d02d31fff3acd8a85d6f31d03 /scripts/generate_rust_analyzer.py | |
parent | d369735e02ef122d19d4c3d093028da0eb400636 (diff) |
block: Rework bio_split() return value
Instead of returning an inconclusive value of NULL for an error in calling
bio_split(), return a ERR_PTR() always.
Also remove the BUG_ON() calls, and WARN_ON_ONCE() instead. Indeed, since
almost all callers don't check the return code from bio_split(), we'll
crash anyway (for those failures).
Fix up the only user which checks bio_split() return code today (directly
or indirectly), blk_crypto_fallback_split_bio_if_needed(). The md/bcache
code does check the return code in cached_dev_cache_miss() ->
bio_next_split() -> bio_split(), but only to see if there was a split, so
there would be no change in behaviour here (when returning a ERR_PTR()).
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: John Garry <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions