patch-2.1.45 linux/kernel/fork.c

Next file: linux/kernel/ksyms.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.44/linux/kernel/fork.c linux/kernel/fork.c
@@ -211,7 +211,7 @@
 	flush_cache_mm(current->mm);
 	pprev = &mm->mmap;
 	for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
-		struct inode *inode;
+		struct dentry *dentry;
 
 		tmp = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
 		if (!tmp) {
@@ -223,11 +223,11 @@
 		tmp->vm_flags &= ~VM_LOCKED;
 		tmp->vm_mm = mm;
 		tmp->vm_next = NULL;
-		inode = tmp->vm_inode;
-		if (inode) {
-			atomic_inc(&inode->i_count);
+		dentry = tmp->vm_dentry;
+		if (dentry) {
+			dentry->d_count++;
 			if (tmp->vm_flags & VM_DENYWRITE)
-				inode->i_writecount--;
+				dentry->d_inode->i_writecount--;
       
 			/* insert tmp into the share list, just after mpnt */
 			if((tmp->vm_next_share = mpnt->vm_next_share) != NULL)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov