]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/shmem.c
[PATCH] mm: batch updating mm_counters
[karo-tx-linux.git] / mm / shmem.c
index ea064d89cda9510d16755ab95127eae62badf94b..6796311a23ef5a20d4241f4ec2d5ca188679d7c9 100644 (file)
@@ -85,7 +85,7 @@ enum sgp_type {
 static int shmem_getpage(struct inode *inode, unsigned long idx,
                         struct page **pagep, enum sgp_type sgp, int *type);
 
-static inline struct page *shmem_dir_alloc(unsigned int gfp_mask)
+static inline struct page *shmem_dir_alloc(gfp_t gfp_mask)
 {
        /*
         * The above definition of ENTRIES_PER_PAGE, and the use of
@@ -898,7 +898,7 @@ struct page *shmem_swapin(struct shmem_inode_info *info, swp_entry_t entry,
 }
 
 static struct page *
-shmem_alloc_page(unsigned long gfp, struct shmem_inode_info *info,
+shmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info,
                 unsigned long idx)
 {
        struct vm_area_struct pvma;
@@ -1201,7 +1201,7 @@ static int shmem_populate(struct vm_area_struct *vma,
                                page_cache_release(page);
                                return err;
                        }
-               } else {
+               } else if (vma->vm_flags & VM_NONLINEAR) {
                        /* No page was found just because we can't read it in
                         * now (being here implies nonblock != 0), but the page
                         * may exist, so set the PTE to fault it in later. */