fs_init: change to_mount to block_device
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
d2c698ac0a
commit
07ea385f96
8 changed files with 73 additions and 2 deletions
|
|
@ -37,6 +37,7 @@ int dirent_populate_children(dirent_t *dir)
|
|||
goto cleanup;
|
||||
|
||||
insert->parent = dir;
|
||||
dirent_inc_ref(dir);
|
||||
|
||||
if (!list_insert(&inode->dirents, insert)) {
|
||||
dirent_free(insert);
|
||||
|
|
@ -211,6 +212,9 @@ dirent_t *dirent_dup(dirent_t *src)
|
|||
ret->fs = src->fs;
|
||||
ret->parent = src->parent;
|
||||
|
||||
if (ret->parent)
|
||||
dirent_inc_ref(ret->parent);
|
||||
|
||||
if (src->inode) {
|
||||
inode_inc_ref(src->inode);
|
||||
ret->inode = src->inode;
|
||||
|
|
@ -221,6 +225,9 @@ dirent_t *dirent_dup(dirent_t *src)
|
|||
|
||||
void dirent_free(dirent_t *dirent)
|
||||
{
|
||||
if (dirent->parent)
|
||||
dirent_dec_ref(dirent->parent);
|
||||
|
||||
kfree(dirent->name);
|
||||
slab_free(dirent_slab, dirent);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue