mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
buffer: Remove mark_buffer_async_write()
There are no more callers of this function, so delete it. end_buffer_async_write() then has only one caller left, so inline it into bh_end_async_write(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20260528173150.1093780-27-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
d755b0a994
commit
e6eff92648
38
fs/buffer.c
38
fs/buffer.c
|
|
@ -438,12 +438,19 @@ static void bh_end_async_read(struct bio *bio)
|
|||
end_buffer_async_read(bh, uptodate);
|
||||
}
|
||||
|
||||
/*
|
||||
* Completion handler for block_write_full_folio() - folios which are unlocked
|
||||
* during I/O, and which have the writeback flag cleared upon I/O completion.
|
||||
/**
|
||||
* bh_end_async_write - I/O end handler for async folio writes
|
||||
* @bio: The bio being completed.
|
||||
*
|
||||
* Pass this function to bh_submit() if you're doing the equivalent of
|
||||
* block_write_full_folio(). That is, the folio is unlocked, and will
|
||||
* have its writeback flag cleared once all async write buffers have
|
||||
* completed.
|
||||
*/
|
||||
static void end_buffer_async_write(struct buffer_head *bh, int uptodate)
|
||||
void bh_end_async_write(struct bio *bio)
|
||||
{
|
||||
struct buffer_head *bh;
|
||||
bool success = bio_endio_bh(bio, &bh);
|
||||
unsigned long flags;
|
||||
struct buffer_head *first;
|
||||
struct buffer_head *tmp;
|
||||
|
|
@ -452,7 +459,7 @@ static void end_buffer_async_write(struct buffer_head *bh, int uptodate)
|
|||
BUG_ON(!buffer_async_write(bh));
|
||||
|
||||
folio = bh->b_folio;
|
||||
if (uptodate) {
|
||||
if (success) {
|
||||
set_buffer_uptodate(bh);
|
||||
} else {
|
||||
buffer_io_error(bh, ", lost async page write");
|
||||
|
|
@ -480,29 +487,8 @@ static void end_buffer_async_write(struct buffer_head *bh, int uptodate)
|
|||
still_busy:
|
||||
spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* bh_end_async_write - I/O end handler for async folio writes
|
||||
* @bio: The bio being completed.
|
||||
*
|
||||
* Pass this function to bh_submit() if you're doing the equivalent of
|
||||
* block_write_full_folio().
|
||||
*/
|
||||
void bh_end_async_write(struct bio *bio)
|
||||
{
|
||||
struct buffer_head *bh;
|
||||
bool success = bio_endio_bh(bio, &bh);
|
||||
end_buffer_async_write(bh, success);
|
||||
}
|
||||
EXPORT_SYMBOL(bh_end_async_write);
|
||||
|
||||
void mark_buffer_async_write(struct buffer_head *bh)
|
||||
{
|
||||
bh->b_end_io = end_buffer_async_write;
|
||||
set_buffer_async_write(bh);
|
||||
}
|
||||
EXPORT_SYMBOL(mark_buffer_async_write);
|
||||
|
||||
|
||||
/*
|
||||
* fs/buffer.c contains helper functions for buffer-backed address space's
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ static inline void clean_bdev_bh_alias(struct buffer_head *bh)
|
|||
clean_bdev_aliases(bh->b_bdev, bh->b_blocknr, 1);
|
||||
}
|
||||
|
||||
void mark_buffer_async_write(struct buffer_head *bh);
|
||||
void __wait_on_buffer(struct buffer_head *);
|
||||
wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
|
||||
struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user