Btrfs: fix hang when failing to submit bio of directIO
The hang is uncoverd by generic/019.
btrfs_endio_direct_write() skips the "finish_ordered_fn" part when it hits
an error, thus those added ordered extents will never get processed, which
block processes that waiting for them via btrfs_start_ordered_extent().
This fixes the above, and meanwhile finish_ordered_fn will do the space
Signed-off-by: Liu Bo <firstname.lastname@example.org>
Reviewed-by: Filipe Manana <email@example.com>
Tested-by: Filipe Manana <firstname.lastname@example.org>
1 file changed