]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/shmem.c
[PATCH] Light weight event counters
[linux-2.6-omap-h63xx.git] / mm / shmem.c
index b14ff817d16264db042313ccb8ba362edc1be014..a9c09e0ba709b774943edf8cab655176f5f82210 100644 (file)
@@ -1045,12 +1045,12 @@ repeat:
                swappage = lookup_swap_cache(swap);
                if (!swappage) {
                        shmem_swp_unmap(entry);
-                       spin_unlock(&info->lock);
                        /* here we actually do the io */
                        if (type && *type == VM_FAULT_MINOR) {
-                               inc_page_state(pgmajfault);
+                               __count_vm_event(PGMAJFAULT);
                                *type = VM_FAULT_MAJOR;
                        }
+                       spin_unlock(&info->lock);
                        swappage = shmem_swapin(info, swap, idx);
                        if (!swappage) {
                                spin_lock(&info->lock);