iomap: cleanup up iomap_dio_bio_end_io()
authorJens Axboe <axboe@kernel.dk>
Wed, 19 Jul 2023 15:34:27 +0000 (09:34 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Aug 2023 23:32:17 +0000 (17:32 -0600)
commit3486237c6fe8d0e5024f9c48bfe73843b1bd8284
treec5d7b115f25a665db14beb385583b32cd14b5912
parentccff6d117d8dc8d8d86e8695a75e5f8b01e573bf
iomap: cleanup up iomap_dio_bio_end_io()

Make the logic a bit easier to follow:

1) Add a release_bio out path, as everybody needs to touch that, and
   have our bio ref check jump there if it's non-zero.
2) Add a kiocb local variable.
3) Add comments for each of the three conditions (sync, inline, or
   async workqueue punt).

No functional changes in this patch.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/iomap/direct-io.c