diff options
author | Christoph Hellwig <[email protected]> | 2023-07-14 10:42:41 +0200 |
---|---|---|
committer | David Sterba <[email protected]> | 2023-07-18 03:14:01 +0200 |
commit | 7cad645ebf20d777b2a48750ebd80fd81593b78c (patch) | |
tree | 1c720cd300c25c5580aa02b43960470668bf096c /tools/perf/scripts/python/Perf-Trace-Util/Context.c | |
parent | 17b17fcd6d446b95904a6929c40012ee7f0afc0c (diff) |
btrfs: fix ordered extent split error handling in btrfs_dio_submit_io
When the call to btrfs_extract_ordered_extent in btrfs_dio_submit_io
fails to allocate memory for a new ordered_extent, it calls into the
btrfs_dio_end_io for error handling. btrfs_dio_end_io then assumes that
bbio->ordered is set because it is supposed to be at this point, except
for this error handling corner case. Try to not overload the
btrfs_dio_end_io with error handling of a bio in a non-canonical state,
and instead call btrfs_finish_ordered_extent and iomap_dio_bio_end_io
directly for this error case.
Reported-by: syzbot <[email protected]>
Fixes: b41b6f6937dc ("btrfs: use btrfs_finish_ordered_extent to complete direct writes")
Reviewed-by: Josef Bacik <[email protected]>
Tested-by: syzbot <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/Context.c')
0 files changed, 0 insertions, 0 deletions