mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
Ext2FS: Propagate I/O errors from Ext2FSInode::write_bytes()
This commit is contained in:
parent
65570216b4
commit
1f53dd0943
Notes:
sideshowbarker
2024-07-18 23:01:44 +09:00
Author: https://github.com/awesomekling
Commit: 1f53dd0943
1 changed files with 3 additions and 4 deletions
|
@ -918,11 +918,10 @@ ssize_t Ext2FSInode::write_bytes(off_t offset, ssize_t count, const UserOrKernel
|
|||
#ifdef EXT2_VERY_DEBUG
|
||||
dbgln("Ext2FS: Writing block {} (offset_into_block: {})", m_block_list[bi], offset_into_block);
|
||||
#endif
|
||||
int err = fs().write_block(m_block_list[bi], data.offset(nwritten), num_bytes_to_copy, offset_into_block, allow_cache);
|
||||
if (err < 0) {
|
||||
auto result = fs().write_block(m_block_list[bi], data.offset(nwritten), num_bytes_to_copy, offset_into_block, allow_cache);
|
||||
if (result.is_error()) {
|
||||
dbgln("Ext2FS: write_block({}) failed (bi: {})", m_block_list[bi], bi);
|
||||
ASSERT_NOT_REACHED();
|
||||
return err;
|
||||
return result;
|
||||
}
|
||||
remaining_count -= num_bytes_to_copy;
|
||||
nwritten += num_bytes_to_copy;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue