mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
Ext2FS: Oops, fix wrong ENOSPC in create_inode()
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 12:00:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bd7c38e7b67
@@ -1190,7 +1190,7 @@ RefPtr<Inode> Ext2FS::create_inode(InodeIdentifier parent_id, const String& name
|
||||
#endif
|
||||
|
||||
auto needed_blocks = ceil_div(size, block_size());
|
||||
if ((size_t)needed_blocks < super_block().s_free_blocks_count) {
|
||||
if ((size_t)needed_blocks > super_block().s_free_blocks_count) {
|
||||
dbg() << "Ext2FS: create_inode: not enough free blocks";
|
||||
error = -ENOSPC;
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user