}
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.
{
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);
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() */