]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - mm/shmem.c
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-artful-kernel.git] / mm / shmem.c
index 9100c4952698ff1ba3becabf77a6309f1dfcbb4a..9418f5a9bc46891df40335a74b809c26e5e94928 100644 (file)
@@ -1291,7 +1291,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
                SetPageUptodate(page);
        }
 
-       swap = get_swap_page();
+       swap = get_swap_page(page);
        if (!swap.val)
                goto redirty;
 
@@ -1327,7 +1327,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
 
        mutex_unlock(&shmem_swaplist_mutex);
 free_swap:
-       swapcache_free(swap);
+       put_swap_page(page, swap);
 redirty:
        set_page_dirty(page);
        if (wbc->for_reclaim)
@@ -1646,8 +1646,7 @@ repeat:
                        if (fault_type) {
                                *fault_type |= VM_FAULT_MAJOR;
                                count_vm_event(PGMAJFAULT);
-                               mem_cgroup_count_vm_event(charge_mm,
-                                                         PGMAJFAULT);
+                               count_memcg_event_mm(charge_mm, PGMAJFAULT);
                        }
                        /* Here we actually start the io */
                        page = shmem_swapin(swap, gfp, info, index);