]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - mm/madvise.c
UBUNTU: Ubuntu-snapdragon-4.4.0-1064.69
[mirror_ubuntu-artful-kernel.git] / mm / madvise.c
index c889fcbb530e98d8779ef75750e1fde08bf786cf..2a0f9a4504f1f7cbe12a5e5a7779d6a823e118b9 100644 (file)
@@ -223,15 +223,14 @@ static long madvise_willneed(struct vm_area_struct *vma,
 {
        struct file *file = vma->vm_file;
 
+       *prev = vma;
 #ifdef CONFIG_SWAP
        if (!file) {
-               *prev = vma;
                force_swapin_readahead(vma, start, end);
                return 0;
        }
 
        if (shmem_mapping(file->f_mapping)) {
-               *prev = vma;
                force_shm_swapin_readahead(vma, start, end,
                                        file->f_mapping);
                return 0;
@@ -246,7 +245,6 @@ static long madvise_willneed(struct vm_area_struct *vma,
                return 0;
        }
 
-       *prev = vma;
        start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
        if (end > vma->vm_end)
                end = vma->vm_end;