Skip to content

Commit dcb28bf

Browse files
author
Lukas Czerner
committed
fs/buffer: remove bh_submit_read() helper
Bugzilla: https://bugzilla.redhat.com/2160719 Tested: xfstests Upstream Status: upstream commit 454552d Author: Zhang Yi <yi.zhang@huawei.com> bh_submit_read() has no user anymore, just remove it. Link: https://lkml.kernel.org/r/20220901133505.2510834-15-yi.zhang@huawei.com Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit 454552d) Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
1 parent afa4906 commit dcb28bf

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

fs/buffer.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3352,31 +3352,6 @@ void __bh_read_batch(int nr, struct buffer_head *bhs[],
33523352
}
33533353
EXPORT_SYMBOL(__bh_read_batch);
33543354

3355-
/**
3356-
* bh_submit_read - Submit a locked buffer for reading
3357-
* @bh: struct buffer_head
3358-
*
3359-
* Returns zero on success and -EIO on error.
3360-
*/
3361-
int bh_submit_read(struct buffer_head *bh)
3362-
{
3363-
BUG_ON(!buffer_locked(bh));
3364-
3365-
if (buffer_uptodate(bh)) {
3366-
unlock_buffer(bh);
3367-
return 0;
3368-
}
3369-
3370-
get_bh(bh);
3371-
bh->b_end_io = end_buffer_read_sync;
3372-
submit_bh(REQ_OP_READ, bh);
3373-
wait_on_buffer(bh);
3374-
if (buffer_uptodate(bh))
3375-
return 0;
3376-
return -EIO;
3377-
}
3378-
EXPORT_SYMBOL(bh_submit_read);
3379-
33803355
void __init buffer_init(void)
33813356
{
33823357
unsigned long nrpages;

include/linux/buffer_head.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ int submit_bh(blk_opf_t, struct buffer_head *);
230230
void write_boundary_block(struct block_device *bdev,
231231
sector_t bblock, unsigned blocksize);
232232
int bh_uptodate_or_lock(struct buffer_head *bh);
233-
int bh_submit_read(struct buffer_head *bh);
234233
int __bh_read(struct buffer_head *bh, blk_opf_t op_flags, bool wait);
235234
void __bh_read_batch(int nr, struct buffer_head *bhs[],
236235
blk_opf_t op_flags, bool force_lock);

0 commit comments

Comments
 (0)