mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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:
parent
15dfe15412
commit
b20f15420f
29
fs/buffer.c
29
fs/buffer.c
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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() */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user