aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/fs.c
diff options
context:
space:
mode:
authorMarvin Borner2021-05-15 22:36:21 +0200
committerMarvin Borner2021-05-15 22:36:21 +0200
commitdf5a8c5b32733ae5e2d872b1c7baa4311a9d2308 (patch)
tree460b35ad421bc74e75e942a35379621ba168c9ea /kernel/features/fs.c
parentf97343c268b0fc19bf93d509a019f3d13c7af5a4 (diff)
Strange fixes
I have no ideas halp
Diffstat (limited to 'kernel/features/fs.c')
-rw-r--r--kernel/features/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/features/fs.c b/kernel/features/fs.c
index fdd5154..923ab7c 100644
--- a/kernel/features/fs.c
+++ b/kernel/features/fs.c
@@ -240,12 +240,12 @@ static struct ext2_inode *ext2_get_inode(u32 i, struct ext2_inode *in_buf, struc
struct ext2_superblock *s = ext2_get_superblock(dev);
assert(s);
struct ext2_bgd *b = ext2_get_bgd(dev);
- assert(b);
u32 block_group = (i - 1) / s->inodes_per_group;
u32 index = (i - 1) % s->inodes_per_group;
u32 block = (index * EXT2_INODE_SIZE) / BLOCK_SIZE;
b += block_group;
+ assert(b);
u32 *buf = ext2_buffer_read(b->inode_table + block, dev);
struct ext2_inode *in =