diff options
author | David Sterba <dsterba@suse.com> | 2020-06-09 19:22:47 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-06-09 19:23:18 +0200 |
commit | f1084bc60a1ec592011a805a0f925f2f1205897d (patch) | |
tree | c24aaa52c6bafe2afa0a4397bfc6a9bd0b954dfa /fs | |
parent | 8e0fa5d7b3df6e7e23e13a7250b00afe32d4e618 (diff) |
Revert "fs: remove dio_end_io()"
This reverts commit b75b7ca7c27dfd61dba368f390b7d4dc20b3a8cb.
The patch restores a helper that was not necessary after direct IO port
to iomap infrastructure, which gets reverted.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/direct-io.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index c44d60f375bc..00b4d15bb811 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -386,6 +386,25 @@ static void dio_bio_end_io(struct bio *bio) spin_unlock_irqrestore(&dio->bio_lock, flags); } +/** + * dio_end_io - handle the end io action for the given bio + * @bio: The direct io bio thats being completed + * + * This is meant to be called by any filesystem that uses their own dio_submit_t + * so that the DIO specific endio actions are dealt with after the filesystem + * has done it's completion work. + */ +void dio_end_io(struct bio *bio) +{ + struct dio *dio = bio->bi_private; + + if (dio->is_async) + dio_bio_end_aio(bio); + else + dio_bio_end_io(bio); +} +EXPORT_SYMBOL_GPL(dio_end_io); + static inline void dio_bio_alloc(struct dio *dio, struct dio_submit *sdio, struct block_device *bdev, |