summaryrefslogtreecommitdiff
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2026-05-28 18:31:39 +0100
committerChristian Brauner <brauner@kernel.org>2026-06-04 10:28:09 +0200
commite6eff926482d0f6ebe038a15348158682f5711a0 (patch)
tree6ed5d2a4c83940ff8a1f2094c920072c251a9755 /fs/buffer.c
parentd755b0a9949b46f207ed079378c40e0181f398b1 (diff)
downloadlinux-next-e6eff926482d0f6ebe038a15348158682f5711a0.tar.gz
linux-next-e6eff926482d0f6ebe038a15348158682f5711a0.zip
buffer: Remove mark_buffer_async_write()
There are no more callers of this function, so delete it. end_buffer_async_write() then has only one caller left, so inline it into bh_end_async_write(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20260528173150.1093780-27-willy@infradead.org Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 50bcef50a4a4..d35f584a06f9 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -438,12 +438,19 @@ static void bh_end_async_read(struct bio *bio)
end_buffer_async_read(bh, uptodate);
}
-/*
- * Completion handler for block_write_full_folio() - folios which are unlocked
- * during I/O, and which have the writeback flag cleared upon I/O completion.
+/**
+ * bh_end_async_write - I/O end handler for async folio writes
+ * @bio: The bio being completed.
+ *
+ * Pass this function to bh_submit() if you're doing the equivalent of
+ * block_write_full_folio(). That is, the folio is unlocked, and will
+ * have its writeback flag cleared once all async write buffers have
+ * completed.
*/
-static void end_buffer_async_write(struct buffer_head *bh, int uptodate)
+void bh_end_async_write(struct bio *bio)
{
+ struct buffer_head *bh;
+ bool success = bio_endio_bh(bio, &bh);
unsigned long flags;
struct buffer_head *first;
struct buffer_head *tmp;
@@ -452,7 +459,7 @@ static void end_buffer_async_write(struct buffer_head *bh, int uptodate)
BUG_ON(!buffer_async_write(bh));
folio = bh->b_folio;
- if (uptodate) {
+ if (success) {
set_buffer_uptodate(bh);
} else {
buffer_io_error(bh, ", lost async page write");
@@ -480,29 +487,8 @@ static void end_buffer_async_write(struct buffer_head *bh, int uptodate)
still_busy:
spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
}
-
-/**
- * bh_end_async_write - I/O end handler for async folio writes
- * @bio: The bio being completed.
- *
- * Pass this function to bh_submit() if you're doing the equivalent of
- * block_write_full_folio().
- */
-void bh_end_async_write(struct bio *bio)
-{
- struct buffer_head *bh;
- bool success = bio_endio_bh(bio, &bh);
- end_buffer_async_write(bh, success);
-}
EXPORT_SYMBOL(bh_end_async_write);
-void mark_buffer_async_write(struct buffer_head *bh)
-{
- bh->b_end_io = end_buffer_async_write;
- set_buffer_async_write(bh);
-}
-EXPORT_SYMBOL(mark_buffer_async_write);
-
/*
* fs/buffer.c contains helper functions for buffer-backed address space's