diff options
author | John Garry <john.g.garry@oracle.com> | 2024-11-11 14:21:45 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-11-11 18:35:46 +0300 |
commit | e546fe1da9bd47a6fddce6b37c17b1aa1811f7d3 (patch) | |
tree | 6f9f63b0c46fe67d02d31fff3acd8a85d6f31d03 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | d369735e02ef122d19d4c3d093028da0eb400636 (diff) | |
download | linux-e546fe1da9bd47a6fddce6b37c17b1aa1811f7d3.tar.xz |
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 <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20241111112150.3756529-2-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions