mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
buffer: Remove submit_bh()
No users are left; remove this API. Also remove/fix comments mentioning it, and end_bio_bh_io_sync() as it's now unused. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20260528173150.1093780-32-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
2dc07082e3
commit
2911b93582
|
|
@ -1624,7 +1624,7 @@ function-trace, we get a much larger output::
|
|||
=> blk_queue_bio
|
||||
=> submit_bio_noacct
|
||||
=> submit_bio
|
||||
=> submit_bh
|
||||
=> bh_submit
|
||||
=> __ext3_get_inode_loc
|
||||
=> ext3_iget
|
||||
=> ext3_lookup
|
||||
|
|
@ -1909,7 +1909,7 @@ tracers.
|
|||
=> blk_queue_bio
|
||||
=> submit_bio_noacct
|
||||
=> submit_bio
|
||||
=> submit_bh
|
||||
=> bh_submit
|
||||
=> ext3_bread
|
||||
=> ext3_dir_bread
|
||||
=> htree_dirblock_to_tree
|
||||
|
|
|
|||
27
fs/buffer.c
27
fs/buffer.c
|
|
@ -1187,14 +1187,6 @@ void __bforget(struct buffer_head *bh)
|
|||
}
|
||||
EXPORT_SYMBOL(__bforget);
|
||||
|
||||
static void end_bio_bh_io_sync(struct bio *bio)
|
||||
{
|
||||
struct buffer_head *bh;
|
||||
bool uptodate = bio_endio_bh(bio, &bh);
|
||||
|
||||
bh->b_end_io(bh, uptodate);
|
||||
}
|
||||
|
||||
static void buffer_set_crypto_ctx(struct bio *bio, const struct buffer_head *bh,
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
|
|
@ -1829,15 +1821,15 @@ static struct buffer_head *folio_create_buffers(struct folio *folio,
|
|||
|
||||
/*
|
||||
* While block_write_full_folio is writing back the dirty buffers under
|
||||
* the page lock, whoever dirtied the buffers may decide to clean them
|
||||
* the folio lock, whoever dirtied the buffers may decide to clean them
|
||||
* again at any time. We handle that by only looking at the buffer
|
||||
* state inside lock_buffer().
|
||||
*
|
||||
* If block_write_full_folio() is called for regular writeback
|
||||
* (wbc->sync_mode == WB_SYNC_NONE) then it will redirty a page which has a
|
||||
* locked buffer. This only can happen if someone has written the buffer
|
||||
* directly, with submit_bh(). At the address_space level PageWriteback
|
||||
* prevents this contention from occurring.
|
||||
* (wbc->sync_mode == WB_SYNC_NONE) then it will redirty a folio which
|
||||
* has a locked buffer. This only can happen if someone has written
|
||||
* the buffer directly, with bh_submit(). At the address_space level
|
||||
* the folio writeback flag prevents this contention from occurring.
|
||||
*
|
||||
* If block_write_full_folio() is called with wbc->sync_mode ==
|
||||
* WB_SYNC_ALL, the writes are posted using REQ_SYNC; this
|
||||
|
|
@ -1954,7 +1946,7 @@ int __block_write_full_folio(struct inode *inode, struct folio *folio,
|
|||
/*
|
||||
* The folio was marked dirty, but the buffers were
|
||||
* clean. Someone wrote them back by hand with
|
||||
* write_dirty_buffer/submit_bh. A rare case.
|
||||
* write_dirty_buffer/bh_submit. A rare case.
|
||||
*/
|
||||
folio_end_writeback(folio);
|
||||
|
||||
|
|
@ -2800,13 +2792,6 @@ sector_t generic_block_bmap(struct address_space *mapping, sector_t block,
|
|||
}
|
||||
EXPORT_SYMBOL(generic_block_bmap);
|
||||
|
||||
void submit_bh(blk_opf_t opf, struct buffer_head *bh)
|
||||
{
|
||||
BUG_ON(!bh->b_end_io);
|
||||
__bh_submit(bh, opf, WRITE_LIFE_NOT_SET, NULL, end_bio_bh_io_sync);
|
||||
}
|
||||
EXPORT_SYMBOL(submit_bh);
|
||||
|
||||
void write_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags)
|
||||
{
|
||||
lock_buffer(bh);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
|
|||
* is the bio, and buffer_heads are used for extracting block
|
||||
* mappings (via a get_block_t call), for tracking state within
|
||||
* a folio (via a folio_mapping) and for wrapping bio submission
|
||||
* for backward compatibility reasons (e.g. submit_bh).
|
||||
* for backward compatibility reasons (e.g. bh_submit).
|
||||
*/
|
||||
struct buffer_head {
|
||||
unsigned long b_state; /* buffer state bitmap (see above) */
|
||||
|
|
@ -244,7 +244,6 @@ void __lock_buffer(struct buffer_head *bh);
|
|||
int sync_dirty_buffer(struct buffer_head *bh);
|
||||
int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags);
|
||||
void write_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags);
|
||||
void submit_bh(blk_opf_t, struct buffer_head *);
|
||||
void bh_submit(struct buffer_head *, blk_opf_t, bio_end_io_t);
|
||||
void write_boundary_block(struct block_device *bdev,
|
||||
sector_t bblock, unsigned blocksize);
|
||||
|
|
|
|||
|
|
@ -1449,7 +1449,7 @@ static unsigned int shrink_folio_list(struct list_head *folio_list,
|
|||
* is possible for a folio to have the dirty flag set,
|
||||
* but it is actually clean (all its buffers are clean).
|
||||
* This happens if the buffers were written out directly,
|
||||
* with submit_bh(). ext3 will do this, as well as
|
||||
* with bh_submit(). ext3 will do this, as well as
|
||||
* the blockdev mapping. filemap_release_folio() will
|
||||
* discover that cleanness and will drop the buffers
|
||||
* and mark the folio clean - it can be freed.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user