]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/memory.c
mmc: s3cmci: fix s3c2410_dma_config() arguments.
[karo-tx-linux.git] / mm / memory.c
index 3a6c4a6583256584303c4ac7c8813938abc49ed0..fe2257f9ac803d84ce61efdf5f10c698d9acefc6 100644 (file)
@@ -64,8 +64,6 @@
 
 #include "internal.h"
 
-#include "internal.h"
-
 #ifndef CONFIG_NEED_MULTIPLE_NODES
 /* use the per-pgdat data instead for discontigmem - mbligh */
 unsigned long max_mapnr;
@@ -1883,7 +1881,7 @@ gotten:
         * Don't let another task, with possibly unlocked vma,
         * keep the mlocked page.
         */
-       if (vma->vm_flags & VM_LOCKED) {
+       if ((vma->vm_flags & VM_LOCKED) && old_page) {
                lock_page(old_page);    /* for LRU manipulation */
                clear_page_mlock(old_page);
                unlock_page(old_page);