buffer: Remove end_buffer_write_sync()

It has no callers left, so delete it.  Inline __end_buffer_write_sync()
into bh_end_write().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://patch.msgid.link/20260528173150.1093780-35-willy@infradead.org
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2026-05-28 18:31:47 +01:00 committed by Christian Brauner
parent 15dfe15412
commit b20f15420f
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
2 changed files with 9 additions and 21 deletions

View File

@ -192,25 +192,6 @@ void bh_end_read(struct bio *bio)
}
EXPORT_SYMBOL(bh_end_read);
static void __end_buffer_write_sync(struct buffer_head *bh, int uptodate)
{
if (uptodate) {
set_buffer_uptodate(bh);
} else {
buffer_io_error(bh, ", lost sync page write");
mark_buffer_write_io_error(bh);
clear_buffer_uptodate(bh);
}
unlock_buffer(bh);
}
void end_buffer_write_sync(struct buffer_head *bh, int uptodate)
{
__end_buffer_write_sync(bh, uptodate);
put_bh(bh);
}
EXPORT_SYMBOL(end_buffer_write_sync);
/**
* bh_end_write - I/O end handler for writes
* @bio: The bio being completed.
@ -222,7 +203,15 @@ void bh_end_write(struct bio *bio)
{
struct buffer_head *bh;
bool success = bio_endio_bh(bio, &bh);
__end_buffer_write_sync(bh, success);
if (success) {
set_buffer_uptodate(bh);
} else {
buffer_io_error(bh, ", lost sync page write");
mark_buffer_write_io_error(bh);
clear_buffer_uptodate(bh);
}
unlock_buffer(bh);
}
EXPORT_SYMBOL(bh_end_write);

View File

@ -201,7 +201,6 @@ struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size);
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() */