Added copy_vma() function.

Sorting out return_from_fork() and kernel stack setup for the child.
This commit is contained in:
Bahadir Balban
2008-08-21 12:18:38 +03:00
parent 69db3a04c0
commit dada3e0b2c
5 changed files with 114 additions and 427 deletions

View File

@@ -122,7 +122,8 @@ struct vm_pager {
struct vm_object {
int npages; /* Number of pages in memory */
int refcnt; /* Number of shadows (or vmas) that refer */
struct list_head shadowers; /* List of links to the vm object that shadows this one */
struct list_head shref; /* Shadow reference from original object */
struct list_head shadowers; /* List of vm objects that shadows this one */
struct vm_object *orig_obj; /* Original object that this one shadows */
unsigned int flags; /* Defines the type and flags of the object */
struct list_head list; /* List of all vm objects in memory */
@@ -142,13 +143,6 @@ struct vm_file {
/* To create per-vma vm_object lists */
struct vm_obj_link {
struct list_head list;
/*
* Ref to shadowers by original objects. This could be in the shadow
* object itself, but then we would not be able to reach its link
* when trying to free it.
*/
struct list_head shref;
struct vm_object *obj;
};