Explorar o código

Ext2FS: Oops, fix wrong ENOSPC in create_inode()

Andreas Kling %!s(int64=5) %!d(string=hai) anos
pai
achega
bd7c38e7b6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Kernel/FileSystem/Ext2FileSystem.cpp

+ 1 - 1
Kernel/FileSystem/Ext2FileSystem.cpp

@@ -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 {};