]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
buffer: Remove end_buffer_write_sync()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 28 May 2026 17:31:47 +0000 (18:31 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 4 Jun 2026 08:28:11 +0000 (10:28 +0200)
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>
fs/buffer.c
include/linux/buffer_head.h

index db604c0e54d44bd0f18eae9500d21a7b3a5ae7fe..7ed8dd77d221c8e2ee2c04f89ddc543c73e126ec 100644 (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);
 
index 1ee56c9f2327ae744517609f9ac95d967bea8edb..8b23bc9a244cb31c1bdf2c202ec72ab91a3812e0 100644 (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() */