Permalink
Browse files

fixed the bug in #7, cont.

  • Loading branch information...
1 parent cb45cea commit dc7f62145c22a89899ab4b9ed89c6745981bb346 @Fleurer committed Apr 2, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/mm/vm.c
View
@@ -36,8 +36,11 @@ int vm_clone(struct vm *to){
for (i=0; i<NVMA; i++) {
vp = &(cu->p_vm.vm_area[i]);
if (vp->v_flag != 0) {
+ // increase the reference count of inode
+ if (vp->v_ino) {
+ vp->v_ino->i_count++;
+ }
to->vm_area[i] = *vp;
- to->vm_area[i].v_ino->i_count++;
}
}
// copy pages tables, with PTE_W turned off.

0 comments on commit dc7f621

Please sign in to comment.