mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
Kernel/Ext2FS: Remove a String allocation in debug logging
We were creating a temporary String just to log the target when writing a symlink directly into inline storage.
This commit is contained in:
parent
4f0e2f2584
commit
9d736772bd
1 changed files with 1 additions and 1 deletions
|
@ -999,7 +999,7 @@ KResultOr<size_t> Ext2FSInode::write_bytes(off_t offset, size_t count, const Use
|
||||||
if (is_symlink()) {
|
if (is_symlink()) {
|
||||||
VERIFY(offset == 0);
|
VERIFY(offset == 0);
|
||||||
if (max((size_t)(offset + count), (size_t)m_raw_inode.i_size) < max_inline_symlink_length) {
|
if (max((size_t)(offset + count), (size_t)m_raw_inode.i_size) < max_inline_symlink_length) {
|
||||||
dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]::write_bytes(): Poking into i_block array for inline symlink '{}' ({} bytes)", identifier(), data.copy_into_string(count), count);
|
dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]::write_bytes(): Poking into i_block array for inline symlink ({} bytes)", identifier(), count);
|
||||||
if (!data.read(((u8*)m_raw_inode.i_block) + offset, (size_t)count))
|
if (!data.read(((u8*)m_raw_inode.i_block) + offset, (size_t)count))
|
||||||
return EFAULT;
|
return EFAULT;
|
||||||
if ((size_t)(offset + count) > (size_t)m_raw_inode.i_size)
|
if ((size_t)(offset + count) > (size_t)m_raw_inode.i_size)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue