patch-2.1.43 linux/mm/mmap.c

Next file: linux/mm/mprotect.c
Previous file: linux/mm/mlock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.42/linux/mm/mmap.c linux/mm/mmap.c
@@ -409,7 +409,7 @@
 		mpnt->vm_offset += (end - area->vm_start);
 		mpnt->vm_start = end;
 		if (mpnt->vm_inode)
-			mpnt->vm_inode->i_count++;
+			atomic_inc(&mpnt->vm_inode->i_count);
 		if (mpnt->vm_ops && mpnt->vm_ops->open)
 			mpnt->vm_ops->open(mpnt);
 		area->vm_end = addr;	/* Truncate area */
@@ -646,7 +646,7 @@
 		}
 		remove_shared_vm_struct(mpnt);
 		if (mpnt->vm_inode)
-			mpnt->vm_inode->i_count--;
+			atomic_dec(&mpnt->vm_inode->i_count);
 		kmem_cache_free(vm_area_cachep, mpnt);
 		mpnt = prev;
 	}

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