mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 01:11:51 -04:00
ext4: remove ext4_end_buffer_io_sync()
There's no need for a custom end_io routine here. We lose some tracing of I/O completions, but we gain better error handling. Well, consistent error handling anyway. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260615182527.2208479-1-willy@infradead.org Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
a6a1e7e569
commit
7f0485dd30
@@ -200,25 +200,6 @@ static inline void ext4_fc_set_snap_err(int *snap_err, int err)
|
||||
*snap_err = err;
|
||||
}
|
||||
|
||||
static void ext4_end_buffer_io_sync(struct bio *bio)
|
||||
{
|
||||
struct buffer_head *bh;
|
||||
bool uptodate = bio_endio_bh(bio, &bh);
|
||||
|
||||
BUFFER_TRACE(bh, "");
|
||||
if (uptodate) {
|
||||
ext4_debug("%s: Block %lld up-to-date",
|
||||
__func__, bh->b_blocknr);
|
||||
set_buffer_uptodate(bh);
|
||||
} else {
|
||||
ext4_debug("%s: Block %lld not up-to-date",
|
||||
__func__, bh->b_blocknr);
|
||||
clear_buffer_uptodate(bh);
|
||||
}
|
||||
|
||||
unlock_buffer(bh);
|
||||
}
|
||||
|
||||
static void ext4_fc_free_inode_snap(struct inode *inode);
|
||||
|
||||
static inline void ext4_fc_reset_inode(struct inode *inode)
|
||||
@@ -691,7 +672,7 @@ static void ext4_fc_submit_bh(struct super_block *sb, bool is_tail)
|
||||
lock_buffer(bh);
|
||||
set_buffer_dirty(bh);
|
||||
set_buffer_uptodate(bh);
|
||||
bh_submit(bh, REQ_OP_WRITE | write_flags, ext4_end_buffer_io_sync);
|
||||
bh_submit(bh, REQ_OP_WRITE | write_flags, bh_end_write);
|
||||
EXT4_SB(sb)->s_fc_bh = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user