fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / mm / mlock.c
index 7922eec..ed63dcb 100644 (file)
@@ -5,6 +5,7 @@
  *  (C) Copyright 2002 Christoph Hellwig
  */
 
+#include <linux/capability.h>
 #include <linux/mman.h>
 #include <linux/mm.h>
 #include <linux/mempolicy.h>
@@ -65,7 +66,7 @@ success:
                        ret = make_pages_present(start, end);
        }
 
-       vx_vmlocked_sub(vma->vm_mm, pages);
+       vx_vmlocked_sub(mm, pages);
 out:
        if (ret == -ENOMEM)
                ret = -EAGAIN;