|
|
@ -49,6 +49,9 @@ int mufs_lookup_page(struct mufs *fs, struct mufs_tree *tree, uint32_t *page, |
|
|
|
int mufs_alloc_page(struct mufs *fs, struct mufs_tree *tree, uint32_t *page, |
|
|
|
int mufs_alloc_page(struct mufs *fs, struct mufs_tree *tree, uint32_t *page, |
|
|
|
uint32_t va) |
|
|
|
uint32_t va) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if (!tree->root && mufs_alloc_block(fs, &tree->root) < 0) |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
return mufs_do_lookup(fs, page, tree->root, tree->depth, va, 1); |
|
|
|
return mufs_do_lookup(fs, page, tree->root, tree->depth, va, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|