Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.3.9 /mm/mlock.c

Filename:/mm/mlock.c
Lines Added:3
Lines Deleted:3
Also changed in: (Previous) 2.1.6  2.1.4  2.1.0 
(Following) 2.3.10  2.3.14  2.3.15  2.3.23  2.3.25  2.3.43 

Location
[  2.3.9
  [  mm
     o  mlock.c

Patch

diff -u --recursive --new-file v2.3.8/linux/mm/mlock.c linux/mm/mlock.c
--- v2.3.8/linux/mm/mlock.c   Sun May 16 21:45:23 1999
+++ linux/mm/mlock.c   Mon Jun 28 13:52:39 1999
@@ -31,7 +31,7 @@
    vma->vm_offset += vma->vm_start - n->vm_start;
    n->vm_flags = newflags;
    if (n->vm_file)
-      n->vm_file->f_count++;
+      atomic_inc(&n->vm_file->f_count);
    if (n->vm_ops && n->vm_ops->open)
       n->vm_ops->open(n);
    insert_vm_struct(current->mm, n);
@@ -52,7 +52,7 @@
    n->vm_offset += n->vm_start - vma->vm_start;
    n->vm_flags = newflags;
    if (n->vm_file)
-      n->vm_file->f_count++;
+      atomic_inc(&n->vm_file->f_count);
    if (n->vm_ops && n->vm_ops->open)
       n->vm_ops->open(n);
    insert_vm_struct(current->mm, n);
@@ -82,7 +82,7 @@
    right->vm_offset += right->vm_start - left->vm_start;
    vma->vm_flags = newflags;
    if (vma->vm_file)
-      vma->vm_file->f_count += 2;
+      atomic_add(2, &vma->vm_file->f_count);
 
    if (vma->vm_ops && vma->vm_ops->open) {
       vma->vm_ops->open(left);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.