mirror of
https://github.com/RGBCube/serenity
synced 2025-07-03 05:32:13 +00:00
Ext2FS: Oops, fix wrong ENOSPC in create_inode()
This commit is contained in:
parent
bff59eff4b
commit
bd7c38e7b6
1 changed files with 1 additions and 1 deletions
|
@ -1190,7 +1190,7 @@ RefPtr<Inode> Ext2FS::create_inode(InodeIdentifier parent_id, const String& name
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto needed_blocks = ceil_div(size, block_size());
|
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";
|
dbg() << "Ext2FS: create_inode: not enough free blocks";
|
||||||
error = -ENOSPC;
|
error = -ENOSPC;
|
||||||
return {};
|
return {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue