diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2026-05-28 18:31:17 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-06-04 10:28:06 +0200 |
| commit | 86ecf5704ed3c731284b9c60e46dcc5d115ebe7c (patch) | |
| tree | 0124f60b64b1087365aa4aa18b30ef541c3215bc /include/linux | |
| parent | df21e33ff9c4ab20eb2a98273c2d9fed300aba26 (diff) | |
| download | lwn-86ecf5704ed3c731284b9c60e46dcc5d115ebe7c.tar.gz lwn-86ecf5704ed3c731284b9c60e46dcc5d115ebe7c.zip | |
buffer: Add bh_end_read(), bh_end_write() and bh_end_async_write()
These are the bio_end_io_t versions of end_buffer_read_sync(),
end_buffer_write_sync() and end_buffer_async_write(). They do not
contain a put_bh() call as it is no longer necessary.
Also add the helper function bio_endio_bh().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://patch.msgid.link/20260528173150.1093780-5-willy@infradead.org
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/buffer_head.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index d59980e4adda..b0a31a90fa79 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -204,6 +204,12 @@ struct buffer_head *create_empty_buffers(struct folio *folio, unsigned long blocksize, unsigned long b_state); void end_buffer_read_sync(struct buffer_head *bh, int uptodate); void end_buffer_write_sync(struct buffer_head *bh, int uptodate); +bool bio_endio_bh(struct bio *bio, struct buffer_head **bhp); + +/* Completion routines suitable for passing to bh_submit() */ +void bh_end_read(struct bio *bio); +void bh_end_write(struct bio *bio); +void bh_end_async_write(struct bio *bio); /* Things to do with metadata buffers list */ void mmb_mark_buffer_dirty(struct buffer_head *bh, struct mapping_metadata_bhs *mmb); |
