It has no callers left, so delete it. Inline __end_buffer_write_sync() into bh_end_write(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/buffer.c | 29 +++++++++-------------------- include/linux/buffer_head.h | 1 - 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index db604c0e54d4..7ed8dd77d221 100644 --- a/fs/buffer.c +++ b/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); diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 1ee56c9f2327..8b23bc9a244c 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -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() */ -- 2.47.3