ext2: mark root vnode no_free
This commit is contained in:
parent
d61edcbe7b
commit
d54aa794c5
2 changed files with 3 additions and 2 deletions
|
|
@ -1303,13 +1303,14 @@ struct fs *ext2_init_fs(struct block_device *bdev)
|
|||
}
|
||||
|
||||
memset(ret->root, 0, sizeof(struct vnode));
|
||||
ret->root->name[0] = '/';
|
||||
ret->root->fs = ret;
|
||||
ret->root->size = root_inode->size;
|
||||
ret->root->uid = root_inode->uid;
|
||||
ret->root->gid = root_inode->gid;
|
||||
ret->root->flags = root_inode->mode;
|
||||
ret->root->ino_num = EXT2_ROOT_INO;
|
||||
ret->root->name[0] = '/';
|
||||
ret->root->no_free = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ struct vnode {
|
|||
|
||||
struct dirent *dirents; /* for directories */
|
||||
|
||||
bool mount_point; /* is this vnode a fs root? */
|
||||
bool mount_ptr; /* does this node point to a root of a mounted fs? */
|
||||
bool no_free; /* permanently cached vnodes */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue